Skip to content
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

🐛 Fix container image resolve in v9 #1705

Merged
merged 1 commit into from
Sep 18, 2023
Merged

Conversation

czunker
Copy link
Contributor

@czunker czunker commented Sep 13, 2023

Now, the os providers tries to find a requested container image locally within the dcker daemon. When this doesn't work, it tries to find the image in a remote registry.

Fixes #1699

Now, the os providers tries to find a requested container image locally within the dcker daemon.
When this doesn't work, it tries to find the image in a remote registry.

Fixes #1699

Signed-off-by: Christian Zunker <[email protected]>
@czunker
Copy link
Contributor Author

czunker commented Sep 13, 2023

Works now for images present locally:

cnquery run container image debian:11 -c "container.image{*}" --verbose 
DBG using provider os with connector container
! using builtin provider for os
→ loaded configuration from /etc/opt/mondoo/mondoo.yml using source default
DBG found docker engine image sha256:54e726b437fbb2dd7b43e4dd5cd79b0181e96a22849b7fc2ffe934fac2d65440
DBG tar> load tar file into backend path=/tmp/mondoo.inspection3801697835

and remote:

cnquery run container image debian:10 -c "container.image{*}" --verbose 
DBG using provider os with connector container
! using builtin provider for os
→ loaded configuration from /etc/opt/mondoo/mondoo.yml using source default
DBG try to download the image from docker registry
DBG detected container image in container registry image=debian:10
DBG asset platform ids platform-ids=["//platformid.api.mondoo.app/runtime/docker/images/972a285e4630b87e839bdcc09cb6fad08956524397b4d3878a5b65a8e6c3fdee"]
DBG found valid container registry reference ref=index.docker.io/library/debian:10
DBG tar> load tar file into backend path=/tmp/mondoo.inspection3196368470
...

@czunker czunker requested a review from imilchev September 13, 2023 17:24
@chris-rock chris-rock added this to the v9 milestone Sep 18, 2023
@vjeffrey vjeffrey merged commit b03fcb7 into main Sep 18, 2023
@vjeffrey vjeffrey deleted the christian/fix_image_resolve branch September 18, 2023 14:47
@github-actions github-actions bot locked and limited conversation to collaborators Sep 18, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

container image is looking for a running docker daemon
3 participants