slimtoolkit / slimtoolkit/slim

DockerSlim is not working

Open
#410 10 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
23.4k
Forks
841
PR merge metrics
No merged PRs in 30d

Description

Expected Behavior

After issuing the docker-slim build --target it has build a slim image


Actual Behavior

It not building the image but giving below error

docker-slim build --target dslimexamples/java-dropwizard-standard:latest --tag dslimexamples/java-dropwizard-standard:slim app='docker-slim' message='Join the Gitter channel to ask questions or to share your feedback' info='https://gitter.im/docker-slim/community' app='docker-slim' message='Join the Discord server to ask questions or to share your feedback' info='https://discord.gg/9tDyxYS' app='docker-slim' message='GitHub Discussions' info='https://github.com/docker-slim/docker-slim/discussions' cmd=build info=param.http.probe message='using default probe' cmd=build state=started cmd=build info=params rt.as.user='true' keep.perms='true' tags='dslimexamples/java-dropwizard-standard:slim' target.type='image' target='dslimexamples/java-dropwizard-standard:latest' continue.mode='probe' cmd=build state=image.inspection.start cmd=build info=image architecture='arm64' id='sha256:29cd07d1baacf9732b2c8dca29daa91e385d2a421d8bac10079a5bf601bd7f7e' size.bytes='534208747' size.human='534 MB' cmd=build info=image.stack id='sha256:29cd07d1baacf9732b2c8dca29daa91e385d2a421d8bac10079a5bf601bd7f7e' index='0' name='dslimexamples/java-dropwizard-standard:latest' cmd=build state=image.inspection.done cmd=build state=container.inspection.start cmd=build info=container id='319ff4dcf58219b5333e6c0e39286fc3847c18af236dd8cc1f7a41043f9c3242' status='created' name='dockerslimk_6481_20221003025740' cmd=build info=report file='slim.report.json' time="2022-10-02T22:57:41-04:00" level=fatal msg="docker-slim: failure" error="API error (400): failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: 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 +0x64\ngithub.com/docker-slim/docker-slim/pkg/util/errutil.FailOn({0x104f40a00, 0x140005f0fc0})\n\tgithub.com/docker-slim/docker-slim/pkg/util/errutil/errutil.go:28 +0x38\ngithub.com/docker-slim/docker-slim/pkg/app.(*ExecutionContext).FailOn(0x14000478840?, {0x104f40a00?, 0x140005f0fc0?})\n\tgithub.com/docker-slim/docker-slim/pkg/app/execontext.go:56 +0x44\ngithub.com/docker-slim/docker-slim/pkg/app/master/commands/build.OnCommand(_, _, {_, _}, _, _, _, _, _, _, ...)\n\tgithub.com/docker-slim/docker-slim/pkg/app/master/commands/build/handler.go:1063 +0x4e34\ngithub.com/docker-slim/docker-slim/pkg/app/master/commands/build.glob..func1(0x1400045bdc0)\n\tgithub.com/docker-slim/docker-slim/pkg/app/master/commands/build/cli.go:694 +0x3c88\ngithub.com/urfave/cli/v2.(*Command).Run(0x1054ffba0, 0x14000189b80)\n\tgithub.com/urfave/cli/v2@v2.3.0/command.go:163 +0x4fc\ngithub.com/urfave/cli/v2.(*App).RunContext(0x14000083860, {0x104f484d0?, 0x1400012e008}, {0x1400012a120, 0x6, 0x6})\n\tgithub.com/urfave/cli/v2@v2.3.0/app.go:313 +0x860\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 +0x4c\nmain.main()\n\tgithub.com/docker-slim/docker-slim/cmd/docker-slim/main.go:15 +0x1c4\n" version="darwin|Transformer|1.38.0|latest|latest"


Steps to Reproduce the Problem

  1. Build a docker image locally (java)
  2. docker-slim build --target dslimexamples/java-dropwizard-standard:latest --tag dslimexamples/java-dropwizard-standard:slim
  3. error

Specifications

  • Version: 1.38
  • Platform:Apple mac
Screen Shot 2022-10-02 at 11 20 45 PM

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

Reproduce the reported docker-slim build command on Apple Mac and start at pkg/app/master/commands/build/handler.go:1063, following the container inspection path and the /opt/dockerslim/bin/docker-slim-sensor launch. Check how the sensor is provided for the reported arm64 image and version; done means the command creates the tagged slim image without the missing-sensor OCI error.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, go
Domain
devops, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 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.