devcontainers / devcontainers/images

add opencontainers labels to the docker images

Open
#1,053 6 comments 2 reactions 0 assignees View on GitHub
backlog
Dominant language
Shell
Stars
2.1k
Forks
963
Avg merge
7h 48m
Merged PRs (30d)
11

Description

Request: Make the published docker images contain `org.opencontainers.image.source` label for easy reference back to this repository when the image gets updates. This is useful for tools like Renovate that makes updates to repositories when this image gets updates. OCI has standardized a few labels for adding metadata to images: https://github.com/opencontainers/image-spec/blob/main/annotations.md

You have currently a few labels already, but it would have been nice if the mentioned `org.opencontainers.image.source` label were added, and preferable also the other standardized labels.

Example of labels in javascript-node:

```shell
$ docker pull mcr.microsoft.com/devcontainers/javascript-node:latest
$ docker inspect mcr.microsoft.com/devcontainers/javascript-node:latest --format '{{ json .Config.Labels }}'
```

Output:

```json
{
"dev.containers.id": "javascript-node",
"dev.containers.release": "v0.3.36",
"dev.containers.source": "https://github.com/devcontainers/images",
"dev.containers.timestamp": "Tue, 07 May 2024 23:52:33 GMT",
"dev.containers.variant": "22-bookworm",
"devcontainer.metadata": "[ {\"id\":\"ghcr.io/devcontainers/features/common-utils:2\"}, {\"id\":\"ghcr.io/devcontainers/features/git:1\"}, {\"id\":\"ghcr.io/devcontainers/features/node:1\",\"customizations\":{\"vscode\":{\"extensions\":[\"dbaeumer.vscode-eslint\"]}}}, {\"customizations\":{\"vscode\":{\"extensions\":[\"dbaeumer.vscode-eslint\"]}},\"remoteUser\":\"node\"} ]",
"version": "1.1.0"
}
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.