slimtoolkit / slimtoolkit/slim

exec: "/bin/sh": stat /bin/sh: no such file or directory

Open
#14 9 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

need repro triage
Dominant language
Go
Stars
23.4k
Forks
840
PR merge metrics
No merged PRs in 30d

Description

After using docker-slim to minify a base image (ui_base) which is used to build one of my apps. The child image fails to build with the error message provided in the title:

exec: "/bin/sh": stat /bin/sh: no such file or directory

Relevant parts of my dockerfile for the child image:

WORKDIR /src
ENTRYPOINT ["/src/docker-entrypoint.sh"]

RUN . /src/deploy.sh

For the deploy script i changed it around to:

CMD ["/src/deploy.sh"]

Which prevents error on the build step, but the entrypoint still gives the same error as above. Is this something obvious that im missing? The minification seems to work great. from 870mb -> 23

Im using:

docker -v
Docker version 1.9.1, build a34a1d5

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the child-image build with the minified ui_base image and Docker 1.9.1, then inspect the image contents alongside /src/docker-entrypoint.sh and /src/deploy.sh. Confirm whether /bin/sh is absent from the minified image and whether both the RUN step and entrypoint can execute successfully when the issue is resolved.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, shell
Domain
devops, infrastructure
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.