rendertron icon indicating copy to clipboard operation
rendertron copied to clipboard

Docker build fails: OCI runtime create failed ... /bin/sh: no such file or directory

Open philly-vanilly opened this issue 8 years ago • 9 comments

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!

philly-vanilly avatar Apr 02 '18 12:04 philly-vanilly

Can some help on it.

pramenku avatar May 23 '18 04:05 pramenku

Getting the same error

heyitsmepatg avatar Jun 01 '18 13:06 heyitsmepatg

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)

marinak6 avatar Jun 26 '18 16:06 marinak6

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

rydnr avatar Oct 25 '18 18:10 rydnr

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.

gasparhugoricardo avatar Nov 06 '18 23:11 gasparhugoricardo

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

fr-karthick-sindhu avatar Nov 16 '18 08:11 fr-karthick-sindhu

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"

collyrooms avatar Feb 16 '19 12:02 collyrooms

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!

ghidinelli avatar Mar 08 '19 21:03 ghidinelli

Thank you @collyrooms . It works for me

shamim-42 avatar Sep 26 '19 09:09 shamim-42