-
Notifications
You must be signed in to change notification settings - Fork 7
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
Cleanup docker #249
Cleanup docker #249
Conversation
The "standalone" TLDR: I think we could remove it. IMHO it depends on how likely Lamassu maintainers are to keep it up-to-date in the long term. |
from #246 (comment):
|
Another oustanding issue: docker build should be verified on pull requests (but not push the image). Thanks for raising this @derhuerst |
As far as I can tell this has to be done separately. DockerHub doesn't look inside the image for a readme, it has to be uploaded manually or programatically.
Not sure I understand. JIB has an option to output the OCI format instead of Docker, but that's probably not what you had in mind? |
Fixed with jib:dockerBuild in test job |
Kudos, SonarCloud Quality Gate passed! |
But many other tools do (e.g. GitHub Packages, IMHO there's no good reason not to add the readme to the image. |
AFAIK, but I'm not sure, there is the Docker-proprietary format (Image Manifest v2) and there is the OCI format. By now, all tooling, including Docker CLI & Docker Hub, should support both. The OCI format also defines annotations, which with certain pre-defined well-known annotations (e.g. Even when building images in the Docker-proprietary format, one can add OCI annotations which will be picked up (e.g. here on GitHub Packages). So, given that most of the ecosystem supports them, they should under many circumstances improve the UX for developers using the image. Not sure how to get JIB to put the annotations though. |
Not really arguing against it, just pointing out it's not a short-coming of jib per se as this would perhaps suggest "Note that the Docker image, as currently built by Jib, lacks the following:" I would suggest creating a separate issue / PR for this.
This is beyond the scope of what we need at Entur and I'm not familiar with OCI. Feel free to contribute on this separately if you need it. |
Just noticed that the current images are missing some helpful metadata. docker image inspect docker.io/entur/lamassu:2024-07-15T11-30 | jq -r --tab '.[0]' shortened for readability: {
"Comment": "jvm arg files",
"Created": "1970-01-01T00:00:00Z",
"DockerVersion": "",
"Author": "",
"Config": {
"Labels": {}
},
"Metadata": {
"LastTagTime": "0001-01-01T00:00:00Z"
}
} Compare this to a docker image inspect ghcr.io/mobidata-bw/postgis-with-pg-plan-filter:2024-05-15T15.25.26-d44ab82 | jq -r --tab '.[0]' [
{
"Comment": "buildkit.dockerfile.v0",
"Created": "2024-05-15T15:25:39.210927025Z",
"DockerVersion": "",
"Author": "",
"Config": {
"Labels": {
"maintainer": "PostGIS Project - https://postgis.net",
"org.opencontainers.image.authors": "MobiData-BW IPL contributors <[email protected]>",
"org.opencontainers.image.description": "PostGIS Docker image with the pg_plan_filter extension.",
"org.opencontainers.image.documentation": "https://github.com/mobidata-bw/postgis-with-pg-plan-filter",
"org.opencontainers.image.licenses": "(EUPL-1.2)",
"org.opencontainers.image.source": "https://github.com/mobidata-bw/postgis-with-pg-plan-filter",
"org.opencontainers.image.title": "postgis-with-pg-plan-filter"
}
},
"Metadata": {
"LastTagTime": "0001-01-01T00:00:00Z"
}
}
] While the metadata is not strictly necessary, various tools (GitHub Container Registry, Docker Registry, Docker CLI, Renovate Bot , etc.) pick them up to provide smarter defaults and a better UX. |
Please refer to the previous comment from me in this PR. If you need this, create a new issue, and contribute a solution. |
Since #246 the Dockerfile isn't really needed in the root anymore. docker-compose users may decide if they want to use the public image (available at docker.io/entur/lamassu) or use this example dockerfile?
cc @derhuerst @hbruch