slimtoolkit / slimtoolkit/slim
Unable to run image due to standard_init_linux.go error
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 23.4k
- Forks
- 840
- PR merge metrics
- No merged PRs in 30d
Description
Expected Behavior
When running an image created with docker-slim, it should actually run the image and not output an error.
Actual Behavior
When trying to run the image created with docker-slim:
standard_init_linux.go:219: exec user process caused: no such file or directory
Searching for this error, the usual case for its appearance seems to be that the entrypoint script cannot be found.
However, I checked the actual files inside the image and the bash script is definitely there (and so is bash itself).
I'm not sure what other file that error could refer to...
The same Dockerfile creates a runnable image via "normal" docker just fine.
Steps to Reproduce the Problem
Can't really help here much since the project is not open source.
However, this is the ENTRYPOINT line of the Dockerfile:
ENTRYPOINT ["/usr/local/bin/setup_sshd"]
And the build command is the following:
sudo docker-slim build --http-probe=false --dockerfile containers/base/Dockerfile --tag lalalala.dkr.ecr.us-east-2.amazonaws.com/base:slimtest --mount /var/run/docker.sock:/var/run/docker.sock --mount /usr/bin/docker:/usr/bin/docker --exec-file "util/dockerslim_execfile" --include-path-file "util/dockerslim_includefile"--continue-after=5 --include-exe-file util/dockerslim_includefile --include-shell=true .
dockerslim_includefile includes only /usr/local/bin/setup_sshd as that file would otherwise get removed by docker-slim (ps: I don't think docker-slim should ever remove an entrypoint file).
Specifications
- Version: docker-slim version linux|Transformer|1.34.0-16-gdc85082|dc85082121a8abf5c3984668b8a0c87d3fd7a51a|2021-02-16_07:58:23AM
- Platform: Manjaro Linux
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the reported ENTRYPOINT /usr/local/bin/setup_sshd, containers/base/Dockerfile, and the util/dockerslim_execfile and util/dockerslim_includefile inputs. Reproduce the docker-slim build if possible and inspect why the slim image cannot execute the preserved script and bash. Done means the resulting image runs its entrypoint without the standard_init_linux.go error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, go
- Domain
- devops, infrastructure
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100