< Back to Knowledgebase

GitHub Container Registry

Updated on 31 July 2024 | 6 months ago | First published on 31 July 2024

Container registry for Docker (and other) images

  • UI: via account’s Packages tab

Package namespace & format for docker:

  • Package namespace: https://ghcr.io
  • Image name format: https://ghcr.io/NAMESPACE/IMAGE_NAME:latest
    • NAMESPACE: GitHub account/org name (e.g. vinoaj)
    • latest can be replaced with a version number
    • e.g https://ghcr.io/vinoaj/my_ai_app:2.5

Associate image with repo

  • Can opt to inherit permissions from repo

Authentication

  • PAT (classic) (for now)

Pushing Container Images

docker push ghcr.io/vinoaj/my_app_image:latest

Dockerfile Labels

Currently 3 labels available

# URL to repo
LABEL org.opencontainers.image.source=https://github.com/vinoaj/my-app
LABEL org.opencontainers.image.description="My container image"
LABEL org.opencontainers.image.licenses=MIT

VS Code

References

Here are some useful links to delve further into the topic.

#github
#docker
#deployment