slimtoolkit / slimtoolkit/slim
[M1 Macbook Pro] docker-slim build error - /opt/dockerslim/bin/docker-slim-sensor: no such file or directory
Open
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 23.4k
- Forks
- 841
- PR merge metrics
- No merged PRs in 30d
Description
Expected Behavior
docker-slim build [image] executes normally.
Actual Behavior
docker-slim build [image] returns the following error:
time="2022-03-08T14:10:48+01:00" level=fatal msg="docker-slim: failure" error="API error (400): OCI runtime create failed: container_linux.go:380: starting container process caused: exec: \"/opt/dockerslim/bin/docker-slim-sensor\": stat /opt/dockerslim/bin/docker-slim-sensor: no such file or directory: unknown" stack="goroutine 1 [running]:\nruntime/debug.Stack()\n\truntime/debug/stack.go:24 +0x88\ngithub.com/docker-slim/docker-slim/pkg/util/errutil.FailOn({0x100e2d240, 0x14000522198})\n\tgithub.com/docker-slim/docker-slim/pkg/util/errutil/errutil.go:28 +0x30\ngithub.com/docker-slim/docker-slim/pkg/app.(*ExecutionContext).FailOn(0x140001bc4e0, {0x100e2d240, 0x14000522198})\n\tgithub.com/docker-slim/docker-slim/pkg/app/execontext.go:49 +0x44\ngithub.com/docker-slim/docker-slim/pkg/app/master/commands/build.OnCommand(0x140001bc4e0, 0x14000116280, {0x16fa8ba0a, 0x5}, 0x0, {0x0, 0x0}, {0x0, 0x0}, {0x0, ...}, ...)\n\tgithub.com/docker-slim/docker-slim/pkg/app/master/commands/build/handler.go:1037 +0x585c\ngithub.com/docker-slim/docker-slim/pkg/app/master/commands/build.glob..func1(0x14000494480)\n\tgithub.com/docker-slim/docker-slim/pkg/app/master/commands/build/cli.go:636 +0x4788\ngithub.com/urfave/cli/v2.(*Command).Run(0x101443fe0, 0x1400056e580)\n\tgithub.com/urfave/cli/v2@v2.3.0/command.go:163 +0x634\ngithub.com/urfave/cli/v2.(*App).RunContext(0x140001029c0, {0x100e41ad0, 0x14000196008}, {0x14000180050, 0x5, 0x5})\n\tgithub.com/urfave/cli/v2@v2.3.0/app.go:313 +0x760\ngithub.com/urfave/cli/v2.(*App).Run(...)\n\tgithub.com/urfave/cli/v2@v2.3.0/app.go:224\ngithub.com/docker-slim/docker-slim/pkg/app/master.Run()\n\tgithub.com/docker-slim/docker-slim/pkg/app/master/app.go:15 +0x64\nmain.main()\n\tgithub.com/docker-slim/docker-slim/cmd/docker-slim/main.go:15 +0x1e4\n" version="darwin|Transformer|1.37.4|latest|latest"
Steps to Reproduce the Problem
- Install docker-slim using homebrew;
brew install docker-slimor by using the M1 Mac binaries - Run
docker-slim buildon any image
Important to note that:
- Both the homebrew package and M1 Mac binaries produce the same error message.
- Both brew audit and test pass successfully.
- Using an older binary does not resolve the issue.
- Copying the docker-slim-sensor binary to
/opt/dockerslim/bindoes not alter the error message.
Specifications
- Version: 1.37.4
- Platform: darwin
- Full: darwin|Transformer|1.37.4|latest|latest
- Model: M1 Pro 14'
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 pkg/app/master/commands/build/handler.go around line 1037 and the Homebrew or M1 binary packaging paths mentioned in the report. Reproduce docker-slim build on an M1 Mac using version 1.37.4, then verify that the sensor is available at /opt/dockerslim/bin/docker-slim-sensor and the build completes without the reported OCI runtime error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, go, macos
- Domain
- devops, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100