slimtoolkit / slimtoolkit/slim
Permission error when using --cmd or --entrypoint instead of --exec. Ideas highly appreciated
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 23.4k
- Forks
- 840
- PR merge metrics
- No merged PRs in 30d
Description
Expected Behavior
I'm running a daemon in a docker container, so I need to run it for a longer time and then tell docker-slim when analysis is done (e.g. via enter or signal).
Running
docker-slim build --target IMAGE --tag IMAGE:0.0.5-slim --http-probe=false --exec='my daemon'
Executes the command correctly and it does not crash with the permission issue, but my daemon never exits, so it is not the right usage here.
Instead of using --exec I need to use --cmd (or --entrypoint), interact with the container and stop analysis manually.
Actual Behavior
However, neither --cmd='my daemon' nor --entrypoint='my daemon' work. In both cases, the execution shows a permission error inside the docker container, while apparently the same command is being executed like with --exec
My thought the user may not be set properly, but at least stdout shows me that docker-slim properly identifies the USER directive present in the Docker image
Steps to Reproduce the Problem
This is an internal tool so I can't share too many details here unfortunately. I'm happy to share more if someone can point me to output that would be of help here.
Specifications
cmd=version info=app version='darwin|Transformer|1.36.1|d8f2be23d44bf9f96c5f1f7e970c739106d17996|2021-06-21_03:24:08AM' container=false dsimage=false
cmd=version info=app outdated=false current=1.36.1 verdict='you have the latest version'
cmd=version info=app location='/Users/USER/gdrive/tools/docker-slim'
cmd=version info=host osname='Big Sur (11.5)'
cmd=version info=host osbuild=20F71
cmd=version info=host version=' Sat May 8 05:10:33 PDT 2021; root:xnu-7195.121.3~9/RELEASE_X86_64'
cmd=version info=host release=20.5.0
cmd=version info=host sysname=darwin
cmd=version info=docker name=docker-desktop
cmd=version info=docker kernel_version=5.10.25-linuxkit
cmd=version info=docker operating_system=Docker Desktop
cmd=version info=docker ostype=linux
cmd=version info=docker server_version=20.10.6
cmd=version info=docker architecture=x86_64
cmd=version info=dclient api_version=1.41
cmd=version info=dclient min_api_version=1.12
cmd=version info=dclient build_time=2021-04-09T22:44:56.000000000+00:00
cmd=version info=dclient git_commit=8728dd2
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 docker-slim build invocation and compare execution with --exec, --cmd, and --entrypoint using a daemon container. Reproduce the permission error, capture the container output, and verify that the daemon can be stopped interactively without the permission failure.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, go
- Domain
- cli, devops
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100