Skip to content

Instantly share code, notes, and snippets.

@pythoninthegrass
Forked from yokawasa/ghcr.md
Created December 28, 2023 18:41
Show Gist options
  • Select an option

  • Save pythoninthegrass/ba7a31fc05788e98fd0f089f6e853ba7 to your computer and use it in GitHub Desktop.

Select an option

Save pythoninthegrass/ba7a31fc05788e98fd0f089f6e853ba7 to your computer and use it in GitHub Desktop.
ghcr (GitHub Container Registry)

ghcr (GitHub Container Registry) quickstart

Setup GHCR

To push container images to ghcr, you need peronal access token (PAT) - see how to create PAT

  1. Get PAT (personal access token)

Personal Settings > Developer settings > Personal access tokens

  1. ghcr login test
# echo $PAT | docker login ghcr.io -u <githubユーザ名> --password-stdin
echo $PAT | docker login ghcr.io -u yokawasa --password-stdin

Login Succeeded
  1. push
docker tag mycontainer ghcr.io/yokawasa/myrepo/mycontainer:0.0.1
docker push ghcr.io/yokawasa/myrepo/mycontainer:0.0.1

REFERENCES

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment