slimtoolkit / slimtoolkit/slim
Using Host network
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 23.4k
- Forks
- 840
- PR merge metrics
- No merged PRs in 30d
Description
Hello,
I am trying to reduce an image based on Debian but I have some issues with the Network. The image I am working on is this one: https://hub.docker.com/r/torpi/roon-core
For some reasons, Roon-Server must run on Host network. Clients and endpoints will not connect otherwise so I cannot run scenarios for the reduction and end with a non-working image.
My naive approch was to set the network like we do with docker run or docker-compose:
./docker-slim build --network="host" imageid
Unfortunately this does not work and the error is not really helpful to me. I was not able to find more information on github or leveraging Google.
Is that a limitation of the tool or am I doing something wrong?
Any help would be appreciated!
docker-slim[build]: state=started
docker-slim[build]: info=params target=fc706cdecd24 continue.mode=enter
docker-slim[build]: state=inspecting.image
docker-slim[build]: info=image id=sha256:fc706cdecd247e3e1d9af9fb40cfe270b2e6509706268895abbeb94dea89c77b size.bytes=562111628 size.human=562 MB
docker-slim[build]: info=image.layers index=0 name='torpi/roon-core' tags='latest'
docker-slim[build]: state=inspecting.container
docker-slim[build]: info=container status=created id=eaa479b8ec017f7d68479ecb4bb2e6b8c25134d1a1e110caafc85100d3949d3b
time="2019-06-19T18:32:55Z" level=fatal msg="docker-slim: failure" error="docker-slim: error => missing comms ports" stack="goroutine 1 [running]:
runtime/debug.Stack(0x17a1, 0xc000126480, 0x3)
/usr/local/Cellar/go/1.11.1/libexec/src/runtime/debug/stack.go:24 +0xa7
github.com/docker-slim/docker-slim/pkg/utils/errutils.FailWhen(0xc00017e001, 0x90ce57, 0x29)
/Users/q/docker-slim/docker-slim/_gopath/src/github.com/docker-slim/docker-slim/pkg/utils/errutils/errutils.go:30 +0x53
github.com/docker-slim/docker-slim/internal/app/master/inspectors/container.(*Inspector).RunContainer(0xc000088a80, 0xc000127048, 0x1)
/Users/q/docker-slim/docker-slim/_gopath/src/github.com/docker-slim/docker-slim/internal/app/master/inspectors/container/container_inspector.go:324 +0x13df
github.com/docker-slim/docker-slim/internal/app/master/commands.OnBuild(0x868101, 0x0, 0x0, 0x0, 0xc000206180, 0x17, 0xc00007a150, 0x7ffc2810a787, 0xc, 0x0, ...)
/Users/q/docker-slim/docker-slim/_gopath/src/github.com/docker-slim/docker-slim/internal/app/master/commands/build.go:157 +0xf7f
github.com/docker-slim/docker-slim/internal/app/master.init.0.func6(0xc000174140, 0x0, 0xc000174140)
/Users/q/docker-slim/docker-slim/_gopath/src/github.com/docker-slim/docker-slim/internal/app/master/cli.go:606 +0x1209
github.com/docker-slim/docker-slim/vendor/github.com/codegangsta/cli.HandleAction(0x857400, 0x91a070, 0xc000174140, 0xc00005a000, 0x0)
/Users/q/docker-slim/docker-slim/_gopath/src/github.com/docker-slim/docker-slim/vendor/github.com/codegangsta/cli/app.go:485 +0xc8
github.com/docker-slim/docker-slim/vendor/github.com/codegangsta/cli.Command.Run(0x8fabe6, 0x5, 0x0, 0x0, 0xc0000995f0, 0x1, 0x1, 0x912fad, 0x3e, 0x0, ...)
/Users/q/docker-slim/docker-slim/_gopath/src/github.com/docker-slim/docker-slim/vendor/github.com/codegangsta/cli/command.go:207 +0x991
github.com/docker-slim/docker-slim/vendor/github.com/codegangsta/cli.(*App).Run(0xc0000aeb60, 0xc00008a000, 0x4, 0x4, 0x0, 0x0)
/Users/q/docker-slim/docker-slim/_gopath/src/github.com/docker-slim/docker-slim/vendor/github.com/codegangsta/cli/app.go:250 +0x6ea
github.com/docker-slim/docker-slim/internal/app/master.runCli()
/Users/q/docker-slim/docker-slim/_gopath/src/github.com/docker-slim/docker-slim/internal/app/master/cli.go:906 +0x55
github.com/docker-slim/docker-slim/internal/app/master.Run()
/Users/q/docker-slim/docker-slim/_gopath/src/github.com/docker-slim/docker-slim/internal/app/master/app.go:6 +0x25
main.main()
/Users/q/docker-slim/docker-slim/_gopath/src/github.com/docker-slim/docker-slim/cmd/docker-slim/main.go:8 +0x20
" version="linux|Transformer|1.25.0|4d304c9adf0d2315ec8d4ca197070f040500cc68|2019-04-25_01:57:04AM (go1.11.1)"
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
Reproduce the reported command with --network="host" and start at internal/app/master/inspectors/container/container_inspector.go:324, where the missing-comms-ports error is raised, then trace the call from internal/app/master/commands/build.go:157. Done means determining whether host networking is supported and providing working behavior or an actionable explanation for this case.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, go
- Domain
- devops, networking
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100