-
-
Notifications
You must be signed in to change notification settings - Fork 732
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable Xray an target image #693
Comments
@gnought are you using Orbstack instead of Docker Desktop? |
@kcq yes, you are right. |
@gnought Still need to verify this... but it appears it should be straightforward to fix. Looks like Orbstack doesn't like missing sha256 prefix in image IDs, at least, in some of the Docker API calls. Will need your help verifying the enhancement. |
@kcq sure, tag me and let me know how to test the fix. :) |
@gnought try this new release and see if you get different results with it |
Hi @kcq, I got a similar error for v1.41.4
|
The error comes from |
thanks for checking @gnought ! that's odd that the fix got lost... need to restore it |
hi @kcq gnought:~/tmp/dist_mac_m1 √ % ./slim --version
mint version darwin/arm64|Aurora|1.41.5|4cc2b185c9cdcd6d0586246e21d8aecc5d847feb|2024-07-01_04:36:47AM
gnought:~/tmp/dist_mac_m1 √ % ./slim x nginx:latest --debug --verbose
cmd=xray state=started
cmd=xray info=cmd.input.params add-image-config='false' rm-file-artifacts='false' target='nginx:latest' add-image-manifest='false'
cmd=xray state=image.api.inspection.start
cmd=xray info=image id='sha256:1aaa8180df68200fd41f9066cf62155e3b71183c04b2895a7388d5fd84ef3c8b' size.bytes='67669989' size.human='68 MB' architecture='arm64'
cmd=xray info=image.stack name='nginx:latest' id='sha256:1aaa8180df68200fd41f9066cf62155e3b71183c04b2895a7388d5fd84ef3c8b' instructions='17' message='see report file for details' index='0'
cmd=xray info=image.exposed_ports list='80/tcp'
cmd=xray state=image.api.inspection.done
cmd=xray state=image.data.inspection.start
cmd=xray info=image.data.inspection.save.image.start
cmd=xray info=image.data.inspection.save.image.end
cmd=xray info=image.data.inspection.process.image.start
time="2024-07-03T01:08:22+08:00" level=error msg="layerFromStream: error reading layer(3239ea84a00d153b5b8f81b47548275701d325537ee211a15719a09589e90ec0) - archive/tar: invalid tar header"
time="2024-07-03T01:08:22+08:00" level=error msg="dockerimage.LoadPackage: error reading oci layer from archive(/Users/gnought/tmp/dist_mac_m1/.mint-state/images/1aaa8180df68200fd41f9066cf62155e3b71183c04b2895a7388d5fd84ef3c8b/image/1aaa8180df68200fd41f9066cf62155e3b71183c04b2895a7388d5fd84ef3c8b.tar/blobs/sha256/3239ea84a00d153b5b8f81b47548275701d325537ee211a15719a09589e90ec0) - archive/tar: invalid tar header"
time="2024-07-03T01:08:22+08:00" level=fatal msg="slim: failure" error="archive/tar: invalid tar header" stack="goroutine 1 [running]:\nruntime/debug.Stack()\n\truntime/debug/stack.go:24 +0x64\ngithub.com/mintoolkit/mint/pkg/util/errutil.FailOn({0x1023e9df8, 0x103650430})\n\tgithub.com/mintoolkit/mint/pkg/util/errutil/errutil.go:32 +0x38\ngithub.com/mintoolkit/mint/pkg/app/master/command/xray.OnCommand(0x140004d0aa8, 0x140001a3860, 0x140004d0ac8, {0x16fc62c39, 0xc}, 0x1, {0x0, 0x0}, {0x0, 0x0}, ...)\n\tgithub.com/mintoolkit/mint/pkg/app/master/command/xray/handler.go:412 +0x2398\ngithub.com/mintoolkit/mint/pkg/app/master/command/xray.glob..func1(0x14000614780)\n\tgithub.com/mintoolkit/mint/pkg/app/master/command/xray/cli.go:340 +0x1754\ngithub.com/urfave/cli/v2.(*Command).Run(0x1036704a0, 0x14000614780, {0x140006147c0, 0x4, 0x4})\n\tgithub.com/urfave/cli/[email protected]/command.go:279 +0x754\ngithub.com/urfave/cli/v2.(*Command).Run(0x14000626160, 0x14000614140, {0x140001d2000, 0x5, 0x5})\n\tgithub.com/urfave/cli/[email protected]/command.go:272 +0x964\ngithub.com/urfave/cli/v2.(*App).RunContext(0x1400061c200, {0x10240cbe8?, 0x1036f2280}, {0x140001d2000, 0x5, 0x5})\n\tgithub.com/urfave/cli/[email protected]/app.go:337 +0x534\ngithub.com/urfave/cli/v2.(*App).Run(...)\n\tgithub.com/urfave/cli/[email protected]/app.go:311\ngithub.com/mintoolkit/mint/pkg/app/master.Run()\n\tgithub.com/mintoolkit/mint/pkg/app/master/app.go:15 +0x4c\nmain.main()\n\tgithub.com/mintoolkit/mint/cmd/mint/main.go:15 +0x194\n" version="darwin/arm64|Aurora|1.41.5|4cc2b185c9cdcd6d0586246e21d8aecc5d847feb|2024-07-01_04:36:47AM"
gnought:~/tmp/dist_mac_m1 ?1 % ./mint x nginx:latest --debug --verbose
cmd=xray state=started
cmd=xray info=cmd.input.params target='nginx:latest' add-image-manifest='false' add-image-config='false' rm-file-artifacts='false'
cmd=xray state=image.api.inspection.start
cmd=xray info=image id='sha256:1aaa8180df68200fd41f9066cf62155e3b71183c04b2895a7388d5fd84ef3c8b' size.bytes='67669989' size.human='68 MB' architecture='arm64'
cmd=xray info=image.stack index='0' name='nginx:latest' id='sha256:1aaa8180df68200fd41f9066cf62155e3b71183c04b2895a7388d5fd84ef3c8b' instructions='17' message='see report file for details'
cmd=xray info=image.exposed_ports list='80/tcp'
cmd=xray state=image.api.inspection.done
cmd=xray state=image.data.inspection.start
cmd=xray info=image.data.inspection.process.image.start
time="2024-07-03T01:08:34+08:00" level=error msg="layerFromStream: error reading layer(3239ea84a00d153b5b8f81b47548275701d325537ee211a15719a09589e90ec0) - archive/tar: invalid tar header"
time="2024-07-03T01:08:34+08:00" level=error msg="dockerimage.LoadPackage: error reading oci layer from archive(/Users/gnought/tmp/dist_mac_m1/.mint-state/images/1aaa8180df68200fd41f9066cf62155e3b71183c04b2895a7388d5fd84ef3c8b/image/1aaa8180df68200fd41f9066cf62155e3b71183c04b2895a7388d5fd84ef3c8b.tar/blobs/sha256/3239ea84a00d153b5b8f81b47548275701d325537ee211a15719a09589e90ec0) - archive/tar: invalid tar header"
time="2024-07-03T01:08:34+08:00" level=fatal msg="slim: failure" error="archive/tar: invalid tar header" stack="goroutine 1 [running]:\nruntime/debug.Stack()\n\truntime/debug/stack.go:24 +0x64\ngithub.com/mintoolkit/mint/pkg/util/errutil.FailOn({0x103109df8, 0x104370430})\n\tgithub.com/mintoolkit/mint/pkg/util/errutil/errutil.go:32 +0x38\ngithub.com/mintoolkit/mint/pkg/app/master/command/xray.OnCommand(0x14000698aa8, 0x14000720460, 0x14000698ac8, {0x16ef42c39, 0xc}, 0x1, {0x0, 0x0}, {0x0, 0x0}, ...)\n\tgithub.com/mintoolkit/mint/pkg/app/master/command/xray/handler.go:412 +0x2398\ngithub.com/mintoolkit/mint/pkg/app/master/command/xray.glob..func1(0x140000a25c0)\n\tgithub.com/mintoolkit/mint/pkg/app/master/command/xray/cli.go:340 +0x1754\ngithub.com/urfave/cli/v2.(*Command).Run(0x1043904a0, 0x140000a25c0, {0x140000a2600, 0x4, 0x4})\n\tgithub.com/urfave/cli/[email protected]/command.go:279 +0x754\ngithub.com/urfave/cli/v2.(*Command).Run(0x140002adce0, 0x1400014fa80, {0x14000152000, 0x5, 0x5})\n\tgithub.com/urfave/cli/[email protected]/command.go:272 +0x964\ngithub.com/urfave/cli/v2.(*App).RunContext(0x14000522200, {0x10312cbe8?, 0x104412280}, {0x14000152000, 0x5, 0x5})\n\tgithub.com/urfave/cli/[email protected]/app.go:337 +0x534\ngithub.com/urfave/cli/v2.(*App).Run(...)\n\tgithub.com/urfave/cli/[email protected]/app.go:311\ngithub.com/mintoolkit/mint/pkg/app/master.Run()\n\tgithub.com/mintoolkit/mint/pkg/app/master/app.go:15 +0x4c\nmain.main()\n\tgithub.com/mintoolkit/mint/cmd/mint/main.go:15 +0x194\n" version="darwin/arm64|Aurora|1.41.5|4cc2b185c9cdcd6d0586246e21d8aecc5d847feb|2024-07-01_04:36:47AM"
gnought:~/tmp/dist_mac_m1 ?1 % |
it's possible that Orbstack's docker save API call is different... need to repro the steps manually to confirm |
I can reproduce it when trying to x-ray:
|
@rfilgueiras thanks for sharing your report! I'll use |
Expected Behavior
run
slim x nginx:latest --debug --verbose
should return xray reports
Actual Behavior
It gives an API error(500)
Specifications
slim version darwin/arm64|Transformer|1.40.11|latest|latest
The text was updated successfully, but these errors were encountered: