Container Registry Package Description

The GitHub container registry is great! I’ve managed to publish my containers with the provided GitHub workflow. However, when I look at my container’s package page, the “package description” is empty – despite my project’s README.md. I haven’t been able to figure out a way to provide a description. I tried setting some metadata in my Dockerfile, but that didn’t work. I can’t find any option to edit the description from package settings. So how am I supposed to edit my container’s description?

Thanks!

That’s great to hear! :tada:

We’re working on better representing your README at the container page view. For now you can set a smaller description via a Docker label which will show up on the container page.

Add the following label to your Dockerfile:

LABEL org.opencontainers.image.description="A short text-only description that will appear on the containers page."

Or you can also add this label at build time:

docker build --label "org.opencontainers.image.description=A short text-only description that will appear on the containers page."

That did it, thanks!

Is there documentation anywhere for which labels are recognized for which purposes? I’ve seen you recommend them in a bunch of posts here, but I can’t find any of them on docs.github.com. The Open Containers spec describes a bunch of annotations, but naturally doesn’t tell me which are used by GHCR and how. It would be very helpful to have a summary. :slightly_smiling_face:

3 Likes

New docs are up for the docker labels required to connect to a repo. We haven’t changed the label, it’s still the org.opencontainers.image.source label but now we have a page describing how this works https://docs.github.com/en/packages/managing-container-images-with-github-container-registry/connecting-a-repository-to-a-container-image

1 Like