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

Add opencontainers labels for container image #869

Merged
merged 1 commit into from
Apr 19, 2022

Conversation

jkremser
Copy link
Member

@jkremser jkremser commented Apr 4, 2022

Although, we don't produce OCI compliant images at the moment. It would be nice to adapt their metadata standards for start. Some tools can already interpret them even if provided as labels in the image json manifest and not as intended (which is OCI annotations).

I was looking into how to produce those OCI images and it's not that easy with goreleaser. It can support podman as enterprise feature, otherwise it uses docker. I was playing with skopeo that can save any image as tar in OCI format. Github registries are ready for OCI images.

There are also org.opencontainers.image.base.name & org.opencontainers.image.base.digest annotations/labels, that can help to construct the full lineage of predecessor of the image (FROM ... relation). These can be added later if we decide that we or community need/want them.

Signed-off-by: Jirka Kremser [email protected]

@jkremser jkremser force-pushed the opencontainers-labels branch 2 times, most recently from e4c8ea3 to 2869bc0 Compare April 5, 2022 13:02
Copy link
Member

@ytsarev ytsarev left a comment

Choose a reason for hiding this comment

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

Isn't it something that can be potentially enhanced in operator-sdk build scripts upstream?

@jkremser
Copy link
Member Author

jkremser commented Apr 6, 2022

Isn't it something that can be potentially enhanced in operator-sdk build scripts upstream?

right, can be, can be.. Although they don't use the goreleaser, but instead prepare some makefile target with docker command.

Recently there was a long discussion about the makefile on kubebuilder@slack. They want to make it more general so that one can plug any other tool instead of the docker... but this assumes the same api contract.. you know all the params need to be the same. It hasn't been merged yet, but if it is, I would rather not add it, because these labels need to be passed as docker build --label .. or as build-args as I do it here and then interpret them in the Dockerfile.

@jkremser jkremser requested a review from ytsarev April 6, 2022 11:02
@jkremser jkremser force-pushed the opencontainers-labels branch from 2869bc0 to 3c8b905 Compare April 14, 2022 09:17
@jkremser jkremser force-pushed the opencontainers-labels branch from 3c8b905 to 3e1955e Compare April 14, 2022 12:33
@jkremser jkremser requested a review from ytsarev April 14, 2022 15:00
@jkremser jkremser merged commit cadfac9 into k8gb-io:master Apr 19, 2022
@jkremser jkremser deleted the opencontainers-labels branch April 19, 2022 09:40
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.

2 participants