Skip to content

Instantly share code, notes, and snippets.

@garnajee
Forked from yokawasa/ghcr.md
Last active May 20, 2024 12:24
Show Gist options
  • Save garnajee/873cc26389cb21d07b19c2dd8150b2f0 to your computer and use it in GitHub Desktop.
Save garnajee/873cc26389cb21d07b19c2dd8150b2f0 to your computer and use it in GitHub Desktop.
ghcr (GitHub Container Registry)

Tips on GHCR (GitHub Container Registry)

Setup GHCR

  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