slimtoolkit / slim

Slim(toolkit): Don't change anything in your container image and minify it by up to 30x (and for compiled languages even more) making it secure too! (free and open source)
Apache License 2.0
18.85k stars 702 forks source link

Failed to execute on GitLab CI #251

Open openedhardware opened 2 years ago

openedhardware commented 2 years ago

The following command has been working well for 6+ months, but suddenly stopped working on gitlab CI:

I have updated the docker-slim version to the latest, but same..

Any idea why this happened suddenly?

Thanks!

$ docker-slim build --http-probe=false --continue-after 60 --env SLIM_SIMULATION='ON' --mount $MOUNT_PATH:/viso --include-path /usr/local/lib/python3.7/site-packages/certifi --show-clogs video-feed
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 state=started
cmd=build info=params continue.mode='timeout' rt.as.user='true' keep.perms='true' tags='' target.type='image' target='video-feed' 
cmd=build state=image.inspection.start
Error Context Info:
'op': 'PrepareImageStateDirs'
'call': 'CopyRegularFile'
'srcSensorPath': '/usr/local/bin/docker-slim-sensor'
'dstSensorPath': '/tmp/docker-slim-state/docker-slim-sensor'
time="2021-12-07T07:57:55Z" level=fatal msg="docker-slim: failure" error="/usr/local/bin/docker-slim-sensor -> /tmp/docker-slim-state/docker-slim-sensor: partial copy - 0/6242304" stack="goroutine 1 [running]:\nruntime/debug.Stack(0xc000616628, 0x0, 0x61af13aa)\n\truntime/debug/stack.go:24 +0x9f\ngithub.com/docker-slim/docker-slim/pkg/util/errutil.FailOnWithInfo(0xfc2dc0, 0xc00044e6f0, 0xc000616628)\n\tgithub.com/docker-slim/docker-slim/pkg/util/errutil/errutil.go:18 +0x6a\ngithub.com/docker-slim/docker-slim/pkg/util/fsutil.PrepareImageStateDirs(0x0, 0x0, 0xc00003c820, 0x47, 0x1, 0x0, 0xb, 0x0, 0x0, 0x0, ...)\n\tgithub.com/docker-slim/docker-slim/pkg/util/fsutil/fsutil.go:966 +0xd39\ngithub.com/docker-slim/docker-slim/pkg/app/master/commands/build.OnCommand(0xc00000c200, 0xc000592230, 0x7ffdeecea67d, 0xa, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)\n\tgithub.com/docker-slim/docker-slim/pkg/app/master/commands/build/handler.go:597 +0x16d5\ngithub.com/docker-slim/docker-slim/pkg/app/master/commands/build.glob..func1(0xc000492840, 0xc0004b1000, 0xc0004b16e0)\n\tgithub.com/docker-slim/docker-slim/pkg/app/master/commands/build/cli.go:625 +0x320b\ngithub.com/urfave/cli.HandleAction(0xd29e80, 0xec5d28, 0xc000492840, 0xc000492840, 0x0)\n\tgithub.com/urfave/cli@v1.22.4/app.go:526 +0xfd\ngithub.com/urfave/cli.Command.Run(0xe7dcf0, 0x5, 0x0, 0x0, 0x155b9b0, 0x1, 0x1, 0xeb977b, 0x6c, 0x0, ...)\n\tgithub.com/urfave/cli@v1.22.4/command.go:174 +0x58e\ngithub.com/urfave/cli.(*App).Run(0xc00058c000, 0xc0000301a0, 0xd, 0xd, 0x0, 0x0)\n\tgithub.com/urfave/cli@v1.22.4/app.go:279 +0x7e8\ngithub.com/docker-slim/docker-slim/pkg/app/master.Run()\n\tgithub.com/docker-slim/docker-slim/pkg/app/master/app.go:15 +0x54\nmain.main()\n\tgithub.com/docker-slim/docker-slim/cmd/docker-slim/main.go:8 +0x25\n" version="linux|Transformer|1.37.2|ca48b5b3f8da2a791591618103edeb539242d4ac|2021-11-08_04:29:53PM"
kcq commented 2 years ago

It looks like it might be local disk space related. It's pretty strange though. docker-slim tries to copy its sensor binary (docker-slim-sensor) to the /tmp directory and it's failing there. What kind of disk space do you have in your Gitlab environment/runner? is /tmp a separate volume?