egeria
egeria copied to clipboard
Add build metadata into container images
In https://github.com/odpi/egeria/pull/5947 we added support for arm64 architecture, and as part of this simplified the container build process to not be dependent on the spotify maven plugin.
This plugin added a little extra dynamic metadata which it would be good to add back in.
Specifically the git commit id
Previously we had this in org.opencontainers.image.revision = 27686c8
THough it's probably better to use the long form.
The newly built images do still contain labels (see https://gist.github.com/eab0a54935cbae214fc36278f78ab759) ie
"org.opencontainers.image.vendor": "= ODPi org.opencontainers.image.title = Egeria org.opencontainers.image.description = Common image for core ODPi Egeria runtime. Based on RedHat UBI 8 openjdk-11 image org.opencontainers.image.url = https://egeria.odpi.org/ org.opencontainers.image.source = unknown org.opencontainers.image.authors = ODPi Egeria org.opencontainers.image.revision = unknown org.opencontainers.image.licenses = Apache-2.0 org.opencontainers.image.created = unknown org.opencontainers.image.version = 3.4-SNAPSHOT org.opencontainers.image.documentation = https://egeria.odpi.org/open-metadata-resources/open-metadata-deployment/docker/egeria/ org.opencontainers.image.ext.vcs-date = unknown org.opencontainers.image.ext.docker.cmd = docker run -d -p 9443:9443 odpi/egeria org.opencontainers.image.ext.docker.cmd.devel = docker run -d -p 9443:9443 -p 5005:5005 -e JAVA_DEBUG=true odpi/egeria org.opencontainers.image.ext.docker.debug = docker exec -it /bin/sh org.opencontainers.image.ext.docker.params = JAVA_DEBUG=set to true to enable JVM debugging",
We should
- determine if this metadata format is still best practice, if not - what is
- determine which/any of these labels we want to keep
- remove any we don't want from the 3 Dockerfiles (just to avoid clutter -> cleanup)
- Set appropriate fixed value, or inject variable from ci/cd for those to keep
From a quick look it is the git commit id that is the single most useful addition, as it can help debug exactly which code version is being run in the case of problems
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 20 days if no further activity occurs. Thank you for your contributions.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 20 days if no further activity occurs. Thank you for your contributions.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 20 days if no further activity occurs. Thank you for your contributions.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 20 days if no further activity occurs. Thank you for your contributions.
will not do this, as it makes the build of the image more complex and no other issues raised/notes requesting it. The container will always have the SHA which can be checked on our repo services, and from there via actions to github, should we need to verify