Open leslie-qiwa opened 2 years ago
Thanks for opening the issue @leslie-qiwa ! This looks like an unexpected failure running the app in the container. The exit path there doesn't cleanup the temporary container docker-slim created. Will be an easy fix :)
The bigger question here is why there's a problem with the entry point in your container image.
os.PathError,Info=fork/exec /entrypoint.sh: no such file or directory
Silly question... Do you have /entrypoint.sh
in your image? What does you entrypoint and cmd instructions look like in your Dockerfile?
This file is not exist in the base container indeed, because our CI will build another running container based on this base container. In this new build process, it will copy entrypoint.sh to the destination.
I'm adding --mount
option, and got new permission deny
failure now. Am I using the right command ?
$ ~/bin/dist_linux/docker-slim build --mount ./box-build/entrypoint.sh:/entrypoint.sh registry.test.pensando.io:5000/pensando/test-infra:2.17.0
docker-slim: message='join the Gitter channel to ask questions or to share your feedback' info='https://gitter.im/docker-slim/community'
docker-slim: message='join the Discord server to ask questions or to share your feedback' info='https://discord.gg/9tDyxYS'
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 target.type='image' target='registry.test.pensando.io:5000/pensando/test-infra:2.17.0' continue.mode='probe' rt.as.user='true' keep.perms='true' tags=''
cmd=build state=image.inspection.start
cmd=build info=image id='sha256:4756ac2575092ca210cd75dd6ad778df31fe71f1606c4922ef86f4063d440863' size.bytes='2119981163' size.human='2.1 GB'
cmd=build info=image.stack index='0' name='registry.test.pensando.io:5000/pensando/test-infra:2.17.0' id='sha256:4756ac2575092ca210cd75dd6ad778df31fe71f1606c4922ef86f4063d440863'
cmd=build state=image.inspection.done
cmd=build state=container.inspection.start
cmd=build info=container status='created' name='dockerslimk_18382_20220804175741' id='3a538228974bf5a95363b415eb3937ddcf4847ec06bfd5896caf3b00971244d0'
cmd=build info=container status='running' name='dockerslimk_18382_20220804175741' id='3a538228974bf5a95363b415eb3937ddcf4847ec06bfd5896caf3b00971244d0'
cmd=build info=container ip='172.17.0.2' message='obtained IP address'
cmd=build info=cmd.startmonitor status='sent'
cmd=build info=event.error status='received' data='SensorError{Op:ptrace.App.trace.app.start,Kind:call.error,Wrapped:{Type=*os.PathError,Info=fork/exec /entrypoint.sh: permission denied,Line:218,File:github.com/docker-slim/docker-slim/pkg/monitor/ptrace/ptrace.go}}'
cmd=build state=exited code=-124 component=container.inspector version=linux|Transformer|1.37.6|26a36c88a94c677efd734e874ba081dabb84a224|2022-04-23_06:03:56AM
cmd=build info=report file='slim.report.json'
docker-slim: message='join the Gitter channel to ask questions or to share your feedback' info='https://gitter.im/docker-slim/community'
docker-slim: message='join the Discord server to ask questions or to share your feedback' info='https://discord.gg/9tDyxYS'
docker-slim: message='Github discussions' info='https://github.com/docker-slim/docker-slim/discussions'
Expected Behavior
docker slim container should quit after analysis
Actual Behavior
It is still running. Every analysis fail and left an running container.
Steps to Reproduce the Problem
This is probably related with our private image and may not be reproduced at your side 1. run `build` command. After build, `docker ps` shows new running docker slim container 2. ``` $ ~/bin/dist_linux/docker-slim build registry.test.pensando.io:5000/pensando/test-infra:2.17.0 docker-slim: message='join the Gitter channel to ask questions or to share your feedback' info='https://gitter.im/docker-slim/community' docker-slim: message='join the Discord server to ask questions or to share your feedback' info='https://discord.gg/9tDyxYS' 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 target.type='image' target='registry.test.pensando.io:5000/pensando/test-infra:2.17.0' continue.mode='probe' rt.as.user='true' keep.perms='true' tags='' cmd=build state=image.inspection.start cmd=build info=image id='sha256:4756ac2575092ca210cd75dd6ad778df31fe71f1606c4922ef86f4063d440863' size.bytes='2119981163' size.human='2.1 GB' cmd=build info=image.stack index='0' name='registry.test.pensando.io:5000/pensando/test-infra:2.17.0' id='sha256:4756ac2575092ca210cd75dd6ad778df31fe71f1606c4922ef86f4063d440863' cmd=build state=image.inspection.done cmd=build state=container.inspection.start cmd=build info=container name='dockerslimk_22990_20220803234535' id='1ac81af314b7bfdbf845346758cac402f0ca10cf19275377d078f9fde192079a' status='created' cmd=build info=container status='running' name='dockerslimk_22990_20220803234535' id='1ac81af314b7bfdbf845346758cac402f0ca10cf19275377d078f9fde192079a' cmd=build info=container message='obtained IP address' ip='172.17.0.8' cmd=build info=cmd.startmonitor status='sent' cmd=build info=event.error status='received' data='SensorError{Op:ptrace.App.trace.app.start,Kind:call.error,Wrapped:{Type=*os.PathError,Info=fork/exec /entrypoint.sh: no such file or directory,Line:218,File:github.com/docker-slim/docker-slim/pkg/monitor/ptrace/ptrace.go}}' cmd=build state=exited code=-124 version=linux|Transformer|1.37.6|26a36c88a94c677efd734e874ba081dabb84a224|2022-04-23_06:03:56AM component=container.inspector cmd=build info=report file='slim.report.json' docker-slim: message='join the Gitter channel to ask questions or to share your feedback' info='https://gitter.im/docker-slim/community' docker-slim: message='join the Discord server to ask questions or to share your feedback' info='https://discord.gg/9tDyxYS' docker-slim: message='Github discussions' info='https://github.com/docker-slim/docker-slim/discussions' ``` --- Specifications ================= - Version: The latest binary ``` $ ~/bin/dist_linux/docker-slim --version docker-slim version linux|Transformer|1.37.6|26a36c88a94c677efd734e874ba081dabb84a224|2022-04-23_06:03:56AM qiwa@qiwa:~/workspace/golang/src/github.com/pensando/test-infra$ ``` - Platform: Ubuntu AMD64 linux.