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

container-utils: docker: enrich container meta with container image digest #2798

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mmat11
Copy link

@mmat11 mmat11 commented May 3, 2024

Description

Add container image digest to container meta when using docker runtime

Testing done

  • Unit tests
  • Manual test

before:

"containerMeta":{
    "runtimeName":"docker",
    "containerID":"24878827d73c97435ad1ceee6fc5fc26f402723065e557bb4d1934b61a7fd8ab",
    "containerName":"competent_swanson",
    "containerImageName":"ubuntu:noble-20240429",
    "containerImageDigest":""
}

after:

"containerMeta":{
    "runtimeName":"docker",
    "containerID":"aaeaa9cc31a183c42c6762bb32aef883ecbfb48e4f13320292bfd3ff8cd16d94",
    "containerName":"funny_goldwasser",
    "containerImageName":"ubuntu:noble-20240429",
    "containerImageDigest":"sha256:3f85b7caad41a95462cf5b787d8a04604c8262cdcdf9a472b8c52ef83375fe15"
}

Copy link
Member

@blanquicet blanquicet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @mmat11, thanks for your contribution and welcome to the IG community!

The PR looks good from code inspection but I still need to test it. For now, I'll run the CI. BTW, if you consider the PR is ready, please mark it as ready.

go.mod Outdated Show resolved Hide resolved
pkg/container-utils/docker/docker_test.go Show resolved Hide resolved
Signed-off-by: Mattia Meleleo <melmat@tuta.io>
@mmat11 mmat11 marked this pull request as ready for review May 23, 2024 21:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants