slimtoolkit / slimtoolkit/slim

always say EOF

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

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 tried to slim the ubuntu:20.04 image, and an own image. Both are getting Error EOF


Actual Behavior

`docker run -it --rm -v /var/run/docker.sock:/var/run/docker.sock dslim/slim:1.40.0
app='slim' message='Join the Gitter channel to ask questions or to share your feedback' info='https://gitter.im/docker-slim/community'
app='slim' message='Join the Discord server to ask questions or to share your feedback' info='https://discord.gg/9tDyxYS'
app='slim' message='GitHub Discussions' info='https://github.com/docker-slim/docker-slim/discussions'

build --target ubuntu:20.04 <-- this is the line I inserted in the docker container

app='slim' message='Join the Gitter channel to ask questions or to share your feedback' info='https://gitter.im/docker-slim/community'
app='slim' message='Join the Discord server to ask questions or to share your feedback' info='https://discord.gg/9tDyxYS'
app='slim' message='GitHub Discussions' info='https://github.com/docker-slim/docker-slim/discussions'
cmd=build info=exec message='changing continue-after from probe to nothing because http-probe is disabled'
cmd=build info=exec message='changing continue-after to enter'
cmd=build state=started
cmd=build info=params target='ubuntu:20.04' continue.mode='enter' rt.as.user='true' keep.perms='true' tags='' target.type='image'
cmd=build state=image.inspection.start
cmd=build info=image id='sha256:1c5c8d0b973ab9d6d7742cf050beefa8ba2efb7779e09bfb1200d6192180766e' size.bytes='72785566' size.human='73 MB'
cmd=build info=image.stack index='0' name='ubuntu:20.04' id='sha256:1c5c8d0b973ab9d6d7742cf050beefa8ba2efb7779e09bfb1200d6192180766e'
cmd=build state=image.inspection.done
cmd=build state=container.inspection.start
time="2023-03-28T15:18:04Z" level=error msg="dockerutil.BuildEmptyImage: dockerapi.BuildImage() error = unexpected EOF"
time="2023-03-28T15:18:04Z" level=fatal msg="docker-slim: failure" error="unexpected EOF" stack="goroutine 1 [running]:\nruntime/debug.Stack()\n\truntime/debug/stack.go:24 +0x65\ngithub.com/docker-slim/docker-slim/pkg/util/errutil.FailOn({0x1eaeac0, 0xc00003a140})\n\tgithub.com/docker-slim/docker-slim/pkg/util/errutil/errutil.go:28 +0x5e\ngithub.com/docker-slim/docker-slim/pkg/app/master/inspectors/container.(*Inspector).RunContainer(0xc000114b00)\n\tgithub.com/docker-slim/docker-slim/pkg/app/master/inspectors/container/container_inspector.go:422 +0x694\ngithub.com/docker-slim/docker-slim/pkg/app/master/commands/build.OnCommand(_, , {, _}, , {, }, {, _}, {0x0, ...}, ...)\n\tgithub.com/docker-slim/docker-slim/pkg/app/master/commands/build/handler.go:875 +0x4186\ngithub.com/docker-slim/docker-slim/pkg/app/master/commands/build.glob..func1(0xc00026b280)\n\tgithub.com/docker-slim/docker-slim/pkg/app/master/commands/build/cli.go:640 +0x4bb0\ngithub.com/urfave/cli/v2.(*Command).Run(0x2c82de0, 0xc000496d80)\n\tgithub.com/urfave/cli/v2@v2.3.0/command.go:163 +0x5bb\ngithub.com/urfave/cli/v2.(*App).RunContext(0xc000509520, {0x1ec7d18?, 0xc000042020}, {0xc0002701e0, 0x5, 0x5})\n\tgithub.com/urfave/cli/v2@v2.3.0/app.go:313 +0xb48\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/commands.(*InteractiveApp).execute(0xc000495590, {0xc00068f830?, 0xc00049e030?})\n\tgithub.com/docker-slim/docker-slim/pkg/app/master/commands/cliprompt.go:101 +0x354\ngithub.com/c-bata/go-prompt.(*Prompt).Run(0xc000488900)\n\tgithub.com/c-bata/go-prompt@v0.2.3/prompt.go:85 +0x82d\ngithub.com/docker-slim/docker-slim/pkg/app/master/commands.(*InteractiveApp).Run(...)\n\tgithub.com/docker-slim/docker-slim/pkg/app/master/commands/cliprompt.go:187\ngithub.com/docker-slim/docker-slim/pkg/app/master.newCLI.func4(0xc000496a40?)\n\tgithub.com/docker-slim/docker-slim/pkg/app/master/cli.go:172 +0x50\ngithub.com/urfave/cli/v2.(*App).RunContext(0xc000509520, {0x1ec7d18?, 0xc000042020}, {0xc00003a200, 0x1, 0x1})\n\tgithub.com/urfave/cli/v2@v2.3.0/app.go:322 +0x953\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 +0x46\nmain.main()\n\tgithub.com/docker-slim/docker-slim/cmd/slim/main.go:15 +0x1aa\n" version="linux|Transformer|1.40.0|a4bb798922820523fceedb9121f5bcfdfc9f2901|2023-01-16_01:52:31AM"
`


Steps to Reproduce the Problem

  1. use the latest (1.40.0) and dockerizied
  2. run docker run -it --rm -v /var/run/docker.sock:/var/run/docker.sock dslim/slim:1.40.0
  3. inside docker write build --target ubuntu:20.04
  4. See EOF Error

Specifications

  • Version: 1.40.0
  • Platform: docker

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 failure with the documented Docker command and target ubuntu:20.04, then trace dockerutil.BuildEmptyImage through pkg/app/master/inspectors/container/container_inspector.go:422 and the Docker API build path shown in the stack trace. Compare the resulting error with the issue title and comments to determine the intended EOF behavior; done means the expected behavior is defined and verified for this reproduction.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, go
Domain
cli, devops, infrastructure
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.