Open madhushesharam opened 1 year ago
Same issue.
level=fatal
msg="docker-slim: failure" error="unexpected event type" stack="...... github.com/docker-slim/docker-slim/pkg/app/master/commands/build/handler.go:876...`
Platform: Mac OS 13.1 Apple M1 Pro
docker version: Client: Cloud integration: v1.0.29 Version: 20.10.21 API version: 1.41 Go version: go1.18.7 Git commit: baeda1f Built: Tue Oct 25 18:01:18 2022 OS/Arch: darwin/arm64 Context: default Experimental: true
likewise
level=fatal msg="docker-slim: failure" error="unexpected event type"...
Platform: Mac OS 13.0 Apple M1 Max
Docker Version: Client: Cloud integration: v1.0.29 Version: 20.10.17 API version: 1.41 Go version: go1.17.11 Git commit: 100c701 Built: Mon Jun 6 23:04:45 2022 OS/Arch: darwin/arm64 Context: default Experimental: true
Server: Docker Desktop 4.12.0 (85629) Engine: Version: 20.10.17 API version: 1.41 (minimum version 1.12) Go version: go1.17.11 Git commit: a89b842 Built: Mon Jun 6 23:01:01 2022 OS/Arch: linux/arm64 Experimental: false containerd: Version: 1.6.8 GitCommit: 9cd3357b7fd7218e4aec3eae239db1f68a5a6ec6 runc: Version: 1.1.4 GitCommit: v1.1.4-0-g5fd4c4d docker-init: Version: 0.19.0 GitCommit: de40ad0
Simpler steps to reproduce:
docker pull nginx:latest
docker-slim build --target nginx:latest
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 target='nginx:latest' continue.mode='probe' rt.as.user='true' keep.perms='true' tags='' target.type='image'
cmd=build state=image.inspection.start
time="2023-02-10T16:51:47Z" level=fatal msg="docker-slim: failure" error="unlinkat /opt/homebrew/bin/.docker-slim-state/images/8a5e3e44915c98a8063d87f2b18d79ab86b80eae45df2e2cde4e32298b89e7b9/artifacts/Dockerfile.fat: permission denied" stack="goroutine 1 [running]:\nruntime/debug.Stack()\n\truntime/debug/stack.go:24 +0x65\ngithub.com/docker-slim/docker-slim/pkg/util/errutil.FailOn({0x2a90c00, 0xc0006d8b70})\n\tgithub.com/docker-slim/docker-slim/pkg/util/errutil/errutil.go:28 +0x5e\ngithub.com/docker-slim/docker-slim/pkg/util/fsutil.PrepareImageStateDirs({0x0, 0x0}, {0xc00015c0a0, 0x47})\n\tgithub.com/docker-slim/docker-slim/pkg/util/fsutil/fsutil.go:1014 +0xb8d\ngithub.com/docker-slim/docker-slim/pkg/app/master/commands/build.inspectFatImage(0xc000092520, {0x2081bd1f3, 0xc}, 0x0, 0x0?, 0x0, {0x0, 0x0}, {0x0, 0x0}, ...)\n\tgithub.com/docker-slim/docker-slim/pkg/app/master/commands/build/image.go:81 +0x7c5\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:599 +0x2a3a\ngithub.com/docker-slim/docker-slim/pkg/app/master/commands/build.glob..func1(0xc00003f480)\n\tgithub.com/docker-slim/docker-slim/pkg/app/master/commands/build/cli.go:607 +0x4730\ngithub.com/urfave/cli/v2.(*Command).Run(0x38657c0, 0xc0000d85c0)\n\tgithub.com/urfave/cli/v2@v2.3.0/command.go:163 +0x5dc\ngithub.com/urfave/cli/v2.(*App).RunContext(0xc000103040, {0x2aa7b10?, 0xc0000500a8}, {0xc00003e080, 0x4, 0x4})\n\tgithub.com/urfave/cli/v2@v2.3.0/app.go:313 +0xb7d\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/docker-slim/main.go:15 +0x18e\n" version="darwin|Transformer|1.39.1|537c77323f2e9a3d6771aa0ea73a047017774d16|2022-11-13_03:27:40AM"
I'm getting this issue too. version 1.40
level=fatal msg="docker-slim: failure" error="unexpected event type" stack="goroutine 1 [running]:\nruntime/debug.Stack()\n\truntime/debug/stack.go:24 +0x65\ngithub.com/docker-slim/docker-slim/pkg/util/errutil.FailOn({0x1edf700, 0xc000422c60})\n\tgithub.com/docker-slim/docker-slim/pkg/util/errutil/errutil.go:28 +0x5e\ngithub.com/docker-slim/docker-slim/pkg/app.(*ExecutionContext).FailOn(0xc0001aedc0?, {0x1edf700?, 0xc000422c60?})\n\tgithub.com/docker-slim/docker-slim/pkg/app/execontext.go:56 +0x49\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:879 +0x422b\ngithub.com/docker-slim/docker-slim/pkg/app/master/commands/build.glob..func1(0xc0000daa00)\n\tgithub.com/docker-slim/docker-slim/pkg/app/master/commands/build/cli.go:640 +0x4bb0\ngithub.com/urfave/cli/v2.(*Command).Run(0x2cd6580, 0xc0000b25c0)\n\tgithub.com/urfave/cli/v2@v2.3.0/command.go:163 +0x5dc\ngithub.com/urfave/cli/v2.(*App).RunContext(0xc000007520, {0x1ef8d70?, 0xc000124000}, {0xc00011a000, 0x10, 0x10})\n\tgithub.com/urfave/cli/v2@v2.3.0/app.go:313 +0xb7d\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 +0x18e\n" version="linux|Transformer|1.40.0|a4bb798922820523fceedb9121f5bcfdfc9f2901|2023-01-15_09:42:23PM"
I'm getting this issue too. version 1.40
level=fatal msg="docker-slim: failure" error="unexpected event type" stack="goroutine 1 [running]:\nruntime/debug.Stack()\n\truntime/debug/stack.go:24 +0x65\ngithub.com/docker-slim/docker-slim/pkg/util/errutil.FailOn({0x1edf700, 0xc000422c60})\n\tgithub.com/docker-slim/docker-slim/pkg/util/errutil/errutil.go:28 +0x5e\ngithub.com/docker-slim/docker-slim/pkg/app.(*ExecutionContext).FailOn(0xc0001aedc0?, {0x1edf700?, 0xc000422c60?})\n\tgithub.com/docker-slim/docker-slim/pkg/app/execontext.go:56 +0x49\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:879 +0x422b\ngithub.com/docker-slim/docker-slim/pkg/app/master/commands/build.glob..func1(0xc0000daa00)\n\tgithub.com/docker-slim/docker-slim/pkg/app/master/commands/build/cli.go:640 +0x4bb0\ngithub.com/urfave/cli/v2.(*Command).Run(0x2cd6580, 0xc0000b25c0)\n\tgithub.com/urfave/cli/v2@v2.3.0/command.go:163 +0x5dc\ngithub.com/urfave/cli/v2.(*App).RunContext(0xc000007520, {0x1ef8d70?, 0xc000124000}, {0xc00011a000, 0x10, 0x10})\n\tgithub.com/urfave/cli/v2@v2.3.0/app.go:313 +0xb7d\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 +0x18e\n" version="linux|Transformer|1.40.0|a4bb798922820523fceedb9121f5bcfdfc9f2901|2023-01-15_09:42:23PM"
I'm having exactly the same issue, using Colima on MacOS
❯ slim --version
slim version darwin|Transformer|1.40.0|latest|latest
❯ docker info
Client:
Context: colima
Debug Mode: false
Server:
Containers: 0
Running: 0
Paused: 0
Stopped: 0
Images: 19
Server Version: 20.10.20
Storage Driver: overlay2
Backing Filesystem: extfs
Supports d_type: true
Native Overlay Diff: true
userxattr: false
Logging Driver: json-file
Cgroup Driver: cgroupfs
Cgroup Version: 1
Plugins:
Volume: local
Network: bridge host ipvlan macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
Swarm: inactive
Runtimes: io.containerd.runtime.v1.linux runc io.containerd.runc.v2
Default Runtime: runc
Init Binary: docker-init
containerd version: 9cd3357b7fd7218e4aec3eae239db1f68a5a6ec6
runc version: 5fd4c4d144137e991c4acebb2146ab1483a97925
init version:
Security Options:
seccomp
Profile: default
Kernel Version: 5.15.82-0-virt
Operating System: Alpine Linux v3.16
OSType: linux
Architecture: x86_64
CPUs: 2
Total Memory: 1.938GiB
Name: colima
ID: T7GZ:P2ZQ:6QML:JXS4:VHD4:GRCD:YN24:4SFU:B4QJ:L7BR:SJZF:P5BR
Docker Root Dir: /var/lib/docker
Debug Mode: false
Registry: https://index.docker.io/v1/
Experimental: false
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false
Looks like the sensor monitors in the temporary container fails to start ('event.monitor.start.failed' event indicates that). We don't know why though. For that we need to get the temporary container logs. You can get those by adding the --show-clogs
build command flag. You can also get them directly using the docker logs command.
That's correct, looks like the issue is with the fanotify not starting properly. There's a related thread (https://github.com/slimtoolkit/slim/issues/178) that this could be a case of the underlying base OS not having support for
fanotify i.e. Alpine. This is the case with Colima default as it uses Alpine
base by default but one can switch to Ubuntu
using the colima start -l
flag. I've switched to ubuntu base on Colima and still seeing the same issue with my build below:
Here's the build container log:
time="2023-02-27T02:10:49Z" level=debug msg="channel.CommandServer.OnConnection.worker: 172.17.0.1:48770 -> 172.17.0.2:65501 - conn.Write wc=99 err=<nil>"
time="2023-02-27T02:10:49Z" level=debug msg="channel.CommandServer.OnConnection.worker: 172.17.0.1:48770 -> 172.17.0.2:65501 - replied with frame='[<|]{\"tid\":\"1677463850245300000.163f5f0f9a621d72\",\"type\":\"ft.response\",\"body\":{\"status\":\"ok\"}}[|>]\n'"
time="2023-02-27T02:10:49Z" level=debug msg="sensor: new command => &{RTASourcePT:true AppName:./start.sh AppArgs:[] AppEntrypoint:[] AppCmd:[] AppUser: AppStdoutToFile:false AppStderrToFile:false RunTargetAsUser:false ReportOnMainPidExit:false KeepPerms:true Perms:map[] Excludes:[] Preserves:map[] Includes:map[] IncludeBins:[] IncludeExes:[] IncludeShell:false IncludeCertAll:true IncludeCertBundles:false IncludeCertDirs:false IncludeCertPKAll:false IncludeCertPKDirs:false IncludeNew:true IncludeOSLibsNet:true IncludeAppNuxtDir:false IncludeAppNuxtBuildDir:false IncludeAppNuxtDistDir:false IncludeAppNuxtStaticDir:false IncludeAppNuxtNodeModulesDir:false IncludeAppNextDir:false IncludeAppNextBuildDir:false IncludeAppNextDistDir:false IncludeAppNextStaticDir:false IncludeAppNextNodeModulesDir:false IncludeNodePackages:[]}"
time="2023-02-27T02:10:49Z" level=debug msg="sensor.app.prepareEnv()"
time="2023-02-27T02:10:49Z" level=debug msg="sensor.app.prepareEnv - prep file artifacts root dir - '/opt/_slim/artifacts/files'"
time="2023-02-27T02:10:49Z" level=debug msg="sensor: getCurrentPaths() - skipping /dev file system objects..."
time="2023-02-27T02:10:49Z" level=debug msg="sensor: getCurrentPaths() - skipping /dev file system objects..."
time="2023-02-27T02:10:49Z" level=debug msg="sensor: getCurrentPaths() - skipping /dev file system objects..."
time="2023-02-27T02:10:51Z" level=debug msg="sensor: getCurrentPaths() - skipping /proc file system objects..."
time="2023-02-27T02:10:51Z" level=debug msg="sensor: getCurrentPaths() - skipping /proc file system objects..."
time="2023-02-27T02:10:51Z" level=debug msg="sensor: getCurrentPaths() - skipping /proc file system objects..."
time="2023-02-27T02:10:51Z" level=debug msg="sensor: getCurrentPaths() - skipping /sys file system objects..."
time="2023-02-27T02:10:51Z" level=debug msg="sensor: getCurrentPaths() - skipping /sys file system objects..."
time="2023-02-27T02:10:51Z" level=debug msg="sensor: getCurrentPaths() - skipping /sys file system objects..."
time="2023-02-27T02:10:51Z" level=debug msg="sensor: getCurrentPaths() - skipping /sys file system objects..."
time="2023-02-27T02:10:51Z" level=debug msg="sensor: getCurrentPaths() - skipping /sys file system objects..."
time="2023-02-27T02:10:51Z" level=debug msg="sensor: getCurrentPaths() - skipping /sys file system objects..."
time="2023-02-27T02:10:51Z" level=debug msg="sensor: getCurrentPaths() - skipping /sys file system objects..."
time="2023-02-27T02:10:51Z" level=debug msg="sensor: getCurrentPaths() - skipping /sys file system objects..."
time="2023-02-27T02:10:51Z" level=debug msg="sensor: getCurrentPaths() - skipping /sys file system objects..."
time="2023-02-27T02:10:51Z" level=debug msg="sensor: getCurrentPaths() - skipping /sys file system objects..."
time="2023-02-27T02:10:51Z" level=debug msg="sensor: getCurrentPaths() - skipping /sys file system objects..."
time="2023-02-27T02:10:53Z" level=info msg="sensor: creating monitors..."
time="2023-02-27T02:10:53Z" level=info msg="sensor: starting monitors..."
time="2023-02-27T02:10:53Z" level=info msg="fanmon: Start"
time="2023-02-27T02:10:53Z" level=error msg="sensor: composite monitor - FAN failed to start running" error="SensorError{Op:sensor.fanotify.Run/fanapi.Initialize,Kind:call.error,Wrapped:{Type=syscall.Errno,Info=function not implemented,Line:101,File:github.com/docker-slim/docker-slim/pkg/app/sensor/monitors/fanotify/monitor.go}}"
time="2023-02-27T02:10:53Z" level=error msg="sensor: failed to start composite monitor" error="SensorError{Op:sensor.fanotify.Run/fanapi.Initialize,Kind:call.error,Wrapped:{Type=syscall.Errno,Info=function not implemented,Line:101,File:github.com/docker-slim/docker-slim/pkg/app/sensor/monitors/fanotify/monitor.go}}"
time="2023-02-27T02:10:53Z" level=debug msg="ipc.Server.TryPublishEvt(&{Name:event.monitor.start.failed Data:[]})"
time="2023-02-27T02:10:53Z" level=debug msg="channel.Broadcast.Write: 172.17.0.1:35524 -> 172.17.0.2:65502 - conn.Write wc=130 err=<nil>"
time="2023-02-27T02:10:53Z" level=debug msg="ipc.Server.TryPublishEvt(&{Name:event.error Data:[run sensor without monitor failed: SensorError{Op:sensor.fanotify.Run/fanapi.Initialize,Kind:call.error,Wrapped:{Type=syscall.Errno,Info=function not implemented,Line:101,File:github.com/docker-slim/docker-slim/pkg/app/sensor/monitors/fanotify/monitor.go}}]})"
time="2023-02-27T02:10:53Z" level=debug msg="channel.Broadcast.Write: 172.17.0.1:35524 -> 172.17.0.2:65502 - conn.Write wc=371 err=<nil>"
time="2023-02-27T02:10:53Z" level=info msg="sensor: done!"
time="2023-02-27T02:10:53Z" level=debug msg="channel.Server.Start.loop.Accept - new connection... [time=1677463853005849206]"
time="2023-02-27T02:10:53Z" level=error msg="channel.Server.Start() - loop.Accept error = accept tcp [::]:65501: use of closed network connection"
time="2023-02-27T02:10:53Z" level=debug msg="channel.Server.Start.loop.Accept - new connection... [time=1677463853005949201]"
time="2023-02-27T02:10:53Z" level=error msg="channel.Server.Start() - loop.Accept error = accept tcp [::]:65502: use of closed network connection"
and here's the same log using the --show-clogs
build command flag:
❯ slim --log-level info --log slim.log build --show-clogs nginx:latest
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=param.http.probe message='using default probe'
cmd=build state=started
cmd=build info=params target.type='image' target='nginx:latest' continue.mode='probe' rt.as.user='true' keep.perms='true' tags=''
cmd=build state=image.inspection.start
cmd=build info=image id='sha256:3f8a00f137a0d2c8a2163a09901e28e2471999fde4efc2f9570b91f1c30acf94' size.bytes='141838619' size.human='142 MB'
cmd=build info=image.stack name='nginx:latest' id='sha256:3f8a00f137a0d2c8a2163a09901e28e2471999fde4efc2f9570b91f1c30acf94' index='0'
cmd=build info=image.exposed_ports list='80'
cmd=build state=image.inspection.done
cmd=build state=container.inspection.start
cmd=build info=container status='created' name='slimk_6948_20230227023254' id='3431e55fdb100fb8350e7ccff01a972f75fa19589df54d65b33deda319111912'
cmd=build info=container id='3431e55fdb100fb8350e7ccff01a972f75fa19589df54d65b33deda319111912' status='running' name='slimk_6948_20230227023254'
cmd=build info=container message='obtained IP address' ip='172.17.0.2'
cmd=build info=cmd.startmonitor status='sent'
cmd=build info=event.startmonitor.done status='received.unexpected' data='&{Name:event.monitor.start.failed Data:<nil>}'
slim: container stdout:
slim: container stderr:
time="2023-02-27T02:32:54Z" level=info msg="sensor: ver=linux|Transformer|1.40.0|latest|latest"
time="2023-02-27T02:32:56Z" level=info msg="sensor: waiting for commands..."
time="2023-02-27T02:32:56Z" level=info msg="sensor: creating monitors..."
time="2023-02-27T02:32:56Z" level=info msg="sensor: starting monitors..."
time="2023-02-27T02:32:56Z" level=info msg="fanmon: Start"
time="2023-02-27T02:32:56Z" level=error msg="sensor: composite monitor - FAN failed to start running" error="SensorError{Op:sensor.fanotify.Run/fanapi.Initialize,Kind:call.error,Wrapped:{Type=syscall.Errno,Info=function not implemented,Line:101,File:github.com/docker-slim/docker-slim/pkg/app/sensor/monitors/fanotify/monitor.go}}"
time="2023-02-27T02:32:56Z" level=error msg="sensor: failed to start composite monitor" error="SensorError{Op:sensor.fanotify.Run/fanapi.Initialize,Kind:call.error,Wrapped:{Type=syscall.Errno,Info=function not implemented,Line:101,File:github.com/docker-slim/docker-slim/pkg/app/sensor/monitors/fanotify/monitor.go}}"
time="2023-02-27T02:32:56Z" level=info msg="sensor: done!"
time="2023-02-27T02:32:56Z" level=error msg="channel.Server.Start() - loop.Accept error = accept tcp [::]:65501: use of closed network connection"
time="2023-02-27T02:32:56Z" level=error msg="channel.Server.Start() - loop.Accept error = accept tcp [::]:65502: use of closed network connection"
slim: end of container logs =============
cmd=build info=report file='slim.report.json'
What's the use case for the fanotify
in the build context? Appreciate any help how to get past this error....
fanotify is one of the monitors used to get the telemetry Slim needs. The failure could be related to QEMU colima/lima uses and/or potentially to M1 macs (at least, for some of the problems shared in this thread).
Expected Behavior
On running docker-slim build $IMAGE , create a SLIM image
using dummy helloworld python image.
Can somebody please help with this, do i need to do more with my config params?
Actual Behavior
$ testpy % docker-slim build hello-world-python
Getting below exception
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 target.type='image' target='hello-world-python' continue.mode='probe' rt.as.user='true' keep.perms='true' tags='' cmd=build state=image.inspection.start cmd=build info=image id='sha256:4c9bff646815b2c4a43633af4925cc61270bea6ac95db6c459287b6ff1bd4d93' size.bytes='954012097' size.human='954 MB' cmd=build info=image.stack index='0' name='python:3' id='sha256:75cc8d87cc34bdb26dfcbe6c9e4483d9b483761510b5069852f52bd8431b8012' cmd=build info=image.stack index='1' name='hello-world-python:latest' id='sha256:4c9bff646815b2c4a43633af4925cc61270bea6ac95db6c459287b6ff1bd4d93' cmd=build info=image.exposed_ports list='3000' cmd=build state=image.inspection.done cmd=build state=container.inspection.start cmd=build info=container status='created' name='dockerslimk_13051_20221228001142' id='789e33a74a0202417cb75c29311097e87786ecba71d1b699141d46dab913618d' cmd=build info=container status='running' name='dockerslimk_1305120221228001142' id='789e33a74a0202417cb75c29311097e87786ecba71d1b699141d46dab913618d' cmd=build info=container message='obtained IP address' ip='172.17.0.3' cmd=build info=cmd.startmonitor status='sent' cmd=build info=event.startmonitor.done status='received.unexpected' data='&{Name:event.monitor.start.failed Data:}'
cmd=build info=report file='slim.report.json'
time="2022-12-27T17:11:44-07:00" level=fatal msg="docker-slim: failure" error="unexpected event type" stack="goroutine 1 [running]:\nruntime/debug.Stack()\n\truntime/debug/stack.go:24 +0x65\ngithub.com/docker-slim/docker-slim/pkg/util/errutil.FailOn({0x2a8f160, 0xc0004a8c60})\n\tgithub.com/docker-slim/docker-slim/pkg/util/errutil/errutil.go:28 +0x5e\ngithub.com/docker-slim/docker-slim/pkg/app.(*ExecutionContext).FailOn(0xc000432000?, {0x2a8f160?, 0xc0004a8c60?})\n\tgithub.com/docker-slim/docker-slim/pkg/app/execontext.go:56 +0x49\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:876 +0x456b\ngithub.com/docker-slim/docker-slim/pkg/app/master/commands/build.glob..func1(0xc000390d40)\n\tgithub.com/docker-slim/docker-slim/pkg/app/master/commands/build/cli.go:607 +0x4730\ngithub.com/urfave/cli/v2.(Command).Run(0x3865720, 0xc00058c680)\n\tgithub.com/urfave/cli/v2@v2.3.0/command.go:163 +0x5dc\ngithub.com/urfave/cli/v2.(App).RunContext(0xc000007ba0, {0x2aa85d0?, 0xc000198008}, {0xc00018e090, 0x3, 0x3})\n\tgithub.com/urfave/cli/v2@v2.3.0/app.go:313 +0xb7d\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/docker-slim/main.go:15 +0x18e\n" version="darwin|Transformer|1.39.0|latest|latest"
Steps to Reproduce the Problem
1. % cat Dockerfile FROM python:3 ADD helloworld.py / RUN pip install flask RUN pip install flask_restful EXPOSE 3000 CMD [ "python", "./helloworld.py"] 2. % cat helloworld.py from flask import Flask, request from flask_restful import Resource, Api app = Flask(__name__) api = Api(app) class Greeting (Resource): def get(self): return 'Hello World!' api.add_resource(Greeting, '/') # Route_1 if __name__ == '__main__': app.run('0.0.0.0','3000') 3. To build the image, run docker build -t hello-world-python . docker-slim build --http-probe=false hello-world-python # tried with http-probe=false --- Specifications ================= - Version: % docker-slim --version docker-slim version darwin|Transformer|1.39.0|latest|latest % docker --version Docker version 20.10.22, build 3a2c30b63a - Platform: Software: System Software Overview: System Version: macOS 13.1 (22C65) Kernel Version: Darwin 22.2.0 Boot Volume: Macintosh HD Boot Mode: Normal Hardware: Hardware Overview: Model Name: MacBook Pro Model Identifier: MacBookPro14,3 Processor Name: Quad-Core Intel Core i7 Processor Speed: 2.9 GHz Number of Processors: 1 Total Number of Cores: 4 L2 Cache (per Core): 256 KB L3 Cache: 8 MB Hyper-Threading Technology: Enabled Memory: 16 GB System Firmware Version: 499.40.2.0.0 OS Loader Version: 564.40.4~55 **Debug Mode Output** ` % docker-slim --debug build --http-probe=true hello-world-python time="2022-12-27T17:22:23-07:00" level=debug msg="sysinfo => system.SystemInfo{Sysname:\"darwin\", Nodename:\"C02VC92QHTD6\", Release:\"22.2.0\", Version:\" Fri Nov 11 02:08:47 PST 2022; root:xnu-8792.61.2~4/RELEASE_X86_64\", Machine:\"x86_64\", Domainname:\"\", OsBuild:\"22C65\", Distro:system.DistroInfo{Name:\"\", Version:\"\", DisplayName:\"other\"}}" 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' time="2022-12-27T17:22:23-07:00" level=debug msg="param.error.app.options - no app params" cmd=build info=param.http.probe message='using default probe' time="2022-12-27T17:22:23-07:00" level=debug msg="customImageTag='', additionalTags=[]string(nil)" app=docker-slim command=build time="2022-12-27T17:22:23-07:00" level=debug msg="docker-slim: new Docker client (env) [5]" cmd=build state=started cmd=build info=params rt.as.user='true' keep.perms='true' tags='' target.type='image' target='hello-world-python' continue.mode='probe' time="2022-12-27T17:22:23-07:00" level=info msg="image=hello-world-python http-probe=true remove-file-artifacts=false image-overrides=map[] entrypoint=[] (false) cmd=[] (false) workdir='' env=[] expose=map[]" app=docker-slim command=build cmd=build info=app container='false' dsimage='false' location='/usr/local/bin' cmd='build' version='darwin|Transformer|1.39.0|latest|latest' cmd=build info=host osbuild='22C65' version=' Fri Nov 11 02:08:47 PST 2022; root:xnu-8792.61.2~4/RELEASE_X86_64' release='22.2.0' sysname='darwin' cmd='build' osname='other' cmd=build info=docker cmd='build' name='default' kernel.version='4.19.130-boot2docker' operating.system='Boot2Docker 19.03.12 (TCL 10.1)' ostype='linux' server.version='19.03.12' architecture='x86_64' cmd=build info=dclient build.time='2020-06-22T15:49:35.000000000+00:00' git.commit='48a66213fe' cmd='build' api.version='1.40' mini.api.version='1.12' cmd=build state=image.inspection.start time="2022-12-27T17:22:23-07:00" level=info msg="inspecting 'fat' image metadata..." app=docker-slim command=build time="2022-12-27T17:22:23-07:00" level=debug msg="PrepareImageStateDirs(,sha256:4c9bff646815b2c4a43633af4925cc61270bea6ac95db6c459287b6ff1bd4d93)" time="2022-12-27T17:22:23-07:00" level=debug msg="PrepareImageStateDirs - statePrefix=/usr/local/bin appDir=/usr/local/bin badPath=/usr/local/bin" time="2022-12-27T17:22:23-07:00" level=debug msg="PrepareImageStateDirs - overriding state path to /tmp/docker-slim-state" time="2022-12-27T17:22:23-07:00" level=debug msg="PrepareImageStateDirs - statePrefix=/tmp/docker-slim-state appDir=/usr/local/bin badPath=/usr/local/bin" time="2022-12-27T17:22:23-07:00" level=debug msg="PrepareImageStateDirs - copying sensor to state path (to /tmp/docker-slim-state)" time="2022-12-27T17:22:23-07:00" level=debug msg="CopyRegularFile(false,/usr/local/bin/docker-slim-sensor,/tmp/docker-slim-state/docker-slim-sensor,true)" time="2022-12-27T17:22:23-07:00" level=debug msg="PrepareImageStateDirs - removing existing state location: /tmp/docker-slim-state/.docker-slim-state/images/4c9bff646815b2c4a43633af4925cc61270bea6ac95db6c459287b6ff1bd4d93/artifacts" time="2022-12-27T17:22:23-07:00" level=debug msg="PrepareImageStateDirs - created new image state location: /tmp/docker-slim-state/.docker-slim-state/images/4c9bff646815b2c4a43633af4925cc61270bea6ac95db6c459287b6ff1bd4d93/artifacts" time="2022-12-27T17:22:23-07:00" level=debug msg="localVolumePath=/tmp/docker-slim-state/.docker-slim-state/images/4c9bff646815b2c4a43633af4925cc61270bea6ac95db6c459287b6ff1bd4d93, artifactLocation=/tmp/docker-slim-state/.docker-slim-state/images/4c9bff646815b2c4a43633af4925cc61270bea6ac95db6c459287b6ff1bd4d93/artifacts, statePath=/tmp/docker-slim-state, stateKey=4c9bff646815b2c4a43633af4925cc61270bea6ac95db6c459287b6ff1bd4d93" app=docker-slim command=build cmd=build info=image size.bytes='954012097' size.human='954 MB' id='sha256:4c9bff646815b2c4a43633af4925cc61270bea6ac95db6c459287b6ff1bd4d93' time="2022-12-27T17:22:23-07:00" level=info msg="processing 'fat' image info..." app=docker-slim command=build time="2022-12-27T17:22:23-07:00" level=debug msg="\n\nIMAGE HISTORY =>\n[]docker.ImageHistory{docker.ImageHistory{ID:\"sha256:4c9bff646815b2c4a43633af4925cc61270bea6ac95db6c459287b6ff1bd4d93\", Tags:[]string{\"hello-world-python:latest\"}, Created:1672186011, CreatedBy:\"/bin/sh -c #(nop) CMD [\\\"python\\\" \\\"./helloworld.py\\\"]\", Size:0, Comment:\"\"}, docker.ImageHistory{ID:\"sha256:5041e3ae0e16cf067dc7fae37c9fae5ec1e86a2f4e3b6b6402acad8c820af398\", Tags:[]string(nil), Created:1672186010, CreatedBy:\"/bin/sh -c #(nop) EXPOSE 3000\", Size:0, Comment:\"\"}, docker.ImageHistory{ID:\"sha256:1de0cca84141a13dfe4763761c26f2847fa9663b05a87cfd118623678f1275c0\", Tags:[]string(nil), Created:1672186010, CreatedBy:\"/bin/sh -c pip install flask_restful\", Size:2687730, Comment:\"\"}, docker.ImageHistory{ID:\"sha256:93912aad3157ec8fe403cebbc76461c9fc1fc81854bfe26ecc8a53d87678d33b\", Tags:[]string(nil), Created:1672186008, CreatedBy:\"/bin/sh -c pip install flask\", Size:19526376, Comment:\"\"}, docker.ImageHistory{ID:\"sha256:ab89ad1cfde54009d37e38c838391bc55486b3fb735357586eafc2b4a28e9f0e\", Tags:[]string(nil), Created:1672186003, CreatedBy:\"/bin/sh -c #(nop) ADD file:084979ddba9db3e62516a7493bfbf53499de3da988545ec835c92f935735846d in / \", Size:292, Comment:\"\"}, docker.ImageHistory{ID:\"sha256:75cc8d87cc34bdb26dfcbe6c9e4483d9b483761510b5069852f52bd8431b8012\", Tags:[]string{\"python:3\"}, Created:1671647810, CreatedBy:\"/bin/sh -c #(nop) CMD [\\\"python3\\\"]\", Size:0, Comment:\"\"}, docker.ImageHistory{ID:\"