Docker build fails: OCI runtime create failed ... /bin/sh: no such file or directory
I git-cloned rendertron as subproject in my main app's project; ran npm install and docker build -t rendertron . --no-cache and got the following error:
Error-log:
Philips-MacBook-Pro:rendertron ply$ docker build -t rendertron . --no-cache
Sending build context to Docker daemon 22.01MB
Step 1/13 : FROM gcr.io/google_appengine/nodejs
---> 8690a710dfd2
Step 2/13 : LABEL name="bot-render" version="0.1" description="Renders a webpage for bot consumption (not production ready)"
---> Running in 671af40673db
Removing intermediate container 671af40673db
---> b5fa5a4ef4d8
Step 3/13 : RUN apt-get update && apt-get install -y wget --no-install-recommends && wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - && sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list' && apt-get update && apt-get install -y google-chrome-stable --no-install-recommends && rm -rf /var/lib/apt/lists/*
---> Running in e10fa1f85f52
OCI runtime create failed: container_linux.go:348: starting container process caused "exec: \"/bin/sh\": stat /bin/sh: no such file or directory": unknown
System:
- MacOS 10.13.3
- Node v8.11.1
- Docker-Version 18.03.0-ce-mac60 (23751) with Experimental Features en- and disabled
Please help!
Can some help on it.
Getting the same error
I'm getting the same error after I imported an image and ran the following command: docker-compose build
Error log: db uses an image, skipping
Building rails
Step 1/7 : FROM caljess599/welld:ubuntu_precomp
---> 6a279dbe7b31
Step 2/7 : WORKDIR /app
Removing intermediate container 7059b7212795
---> 36b2ed98f79b
Step 3/7 : ADD Gemfile /app/
---> 67efb1fa5825
Step 4/7 : ADD Gemfile.lock /app/
---> 2287eec32ba7
Step 5/7 : RUN bundle install
---> Running in 5d45b61b407b
ERROR: Service 'rails' failed to build: OCI runtime create failed: container_linux.go:348: starting container process caused "exec: \"/bin/sh\": stat /bin/sh: no such file or directory": unknown
System:
- MacOS 10.12.6
- Docker-Version 18.03.1-ce-mac65 (24312)
I think this issue has to do with the images you're trying to run. They don't seem to include /bin/sh.
@philly-vanilly I'd try to run docker run -it --rm --entrypoint=/bin/bash b5fa5a4ef4d8
@marinak6 I'd try to run docker run -it --rm --entrypoint=/bin/bash 2287eec32ba7
Hi, I'm getting the same error while trying to run an image in CentOS, the exact same image in Ubuntu runs perfectly, so I don't think this is a problem with the image.
Hi, Has anyone resolved this issue. I am getting the same error! I ain't using docker-compose, I am unable to build a docker image in my Mac
OCI runtime create failed: container_linux.go:348: starting container process caused "exec: \"/bin/sh\": stat /bin/sh: no such file or directory": unknown
Hi, Has anyone resolved this issue. I am getting the same error! I ain't using docker-compose, I am unable to build a docker image in my Mac
OCI runtime create failed: container_linux.go:348: starting container process caused "exec: \"/bin/sh\": stat /bin/sh: no such file or directory": unknown
The scratch image is "empty". There are no files provided by the base image, most importantly there is no shell (bash, sh, etc).
When you tried to run the bash script it failed because there is no bash binary to run it.
If you'd like to just run a bash script, you should try creating an image from alpine which is a minimal linux distribution:
FROM alpine:3.4
CMD echo "hello"
I've been battling this for an unrelated Docker project and made my way here. In case this helps anyone else, it seems the underlying / intermediate images got corrupted somehow. Removing the base image and all children and repulling down the base fixed it for me. Hope that helps!
Thank you @collyrooms . It works for me