Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

OCI runtime create failed: container_linux.go:296 - no such file or directory

End of my Dockerfile:

ENTRYPOINT ["ls /etc"]

Terminal:

...Rest of the building  above is fine
Step 8/8 : ENTRYPOINT ["ls /etc"]
 ---> Using cache
 ---> ea1f33b8ab22
Successfully built ea1f33b8ab22
Successfully tagged redis:latest
k@Karls ~/dev/docker_redis (master) $ docker run -d -p 6379:6379 --name red redis
71d75058b94f088ef872b08a115bc12cece288b53fe26d67960fe139953ed5c4
docker: Error response from daemon: OCI runtime create failed: container_linux.go:296: starting container process caused "exec: \"ls /etc\": stat ls /etc: no such file or directory": unknown.

For some reason, it won't find the directory /etc. I did a pwd and the current working directory is /. I also did a ls / on the entrypoint and that displayed the /etc directory fine.

like image 877
basickarl Avatar asked Feb 02 '18 16:02

basickarl


People also ask

What is an OCI runtime?

Open Container Initiative (OCI) Runtimes. Sometimes referred to as "low-level" runtimes, implementations of the OCI Runtime spec are focused on managing the container lifecycle—abstracting the Linux primitives—and are not required to do much else. Low level runtimes create and run “the container.”

How do I stop a docker container?

Note that pressing `Ctrl+C` when the terminal is attached to a container output causes the container to shut down.


1 Answers

OCI runtime create failed: container_linux.go:296

In my experience this is an error with the docker daemon itself, not the container you are trying to run. Try deleting all containers, restarting the daemon. I think we also had to clean up the docker networks.

like image 108
ZeissS Avatar answered Nov 07 '22 02:11

ZeissS