Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to fix OCI runtime create failed in Docker

Tags:

shell

docker

I imported a Docker image on my new Rasbian Stretch installation. The image run good on the previous installation (Rasbian Stretch too). The problem is : when i try to run image on the new installation with bash command (but laso with npm start, etc), i have this problem :

$ docker run -ti nodejs:latest bash
docker: Error response from daemon: OCI runtime create failed:    container_linux.go:345: starting container process caused "exec: \"bash\": executable file not found in $PATH": unknown.

I try to save again the original image to do again the import and run. But it's always the same problem.

The docker version on the previous installation is : 18.04.0-ce And now: 18.09.0.

I try to install the same version of docker than before but it didn't change anything.

I also try this solution : https://github.com/docker/for-linux/issues/561 Which say to remove the line "MountFlags=slave" in /lib/systemd/system/docker.service But i don't have this file. So i did :

grep -sr "MountFlags=slave" /

Output :

/lib/systemd/system/systemd-udevd.service:MountFlags=slave

so, I went to /lib/systemd/system/systemd-udevd.service to put in commentary the line "MountFlags=slave". Then I did : systemctl daemon-reload and systemctl restart docker

But noting work and I have still the same problem.

Finally this works : docker run hello-world

My Dockerfile :

    FROM node:8-jessie

RUN apt-get update
RUN apt-get install -y vim fswebcam 

# for mjpg_streamer
RUN apt-get install -y cmake libjpeg8-dev
RUN apt-get install -y gcc g++
EXPOSE 8080

WORKDIR /app
CMD ['npm', 'start']

I don't understand why my image can't run on my new installation whereas it works on my previous installation.

Thanks you !

like image 767
MathiasBsrt Avatar asked Nov 26 '22 13:11

MathiasBsrt


1 Answers

I know this is an old thread but putting the solution here that worked for me.

I had the same problem when importing the docker image with docker import <dockeriamges.tar>.

Using docker load --input <dockeriamges.tar> instead solved the problem.

like image 172
Kunal Shah Avatar answered Nov 29 '22 03:11

Kunal Shah