nextcloud / docker

⛴ Docker image of Nextcloud
https://hub.docker.com/_/nextcloud/
GNU Affero General Public License v3.0
6.12k stars 1.83k forks source link

Add opencontainer labels to Docker images #2282

Open RyanNgWH opened 3 months ago

RyanNgWH commented 3 months ago

It would be great if the Docker container images had opencontainers labels. I have seen this across multiple other containers and believe this is the standard for labeling images.

https://github.com/opencontainers/image-spec/blob/main/annotations.md

Adding labels such as org.opencontainers.image.version will provide a way to obtain the current version of the running docker image which can be useful in automating the process of checking for updates.

Doing a docker inspect on the current images shows no labels. Here is an example of the Jellyfin docker image with opencontainers labels:

"Labels": {
    "org.opencontainers.image.description": "The Free Software Media System",
    "org.opencontainers.image.documentation": "https://jellyfin.org/docs/",
    "org.opencontainers.image.source": "https://github.com/jellyfin/jellyfin",
    "org.opencontainers.image.title": "Jellyfin",
    "org.opencontainers.image.url": "https://jellyfin.org",
    "org.opencontainers.image.version": "10.9.8"
}
joshtrichards commented 3 months ago

Looks like some of the other Docker Official program images support this. It would require changes to our update script and possibly Dockerfile templates I guess.

MariaDB image's approach:

For us the equivalent would be somewhere around here:

J0WI commented 1 month ago

https://github.com/docker-library/official-images/issues/3540#issuecomment-530925319

This doesn't sound very encouraging