This is a personal note when migrating images from Dockerhub to Github Container Registry.
https://github.blog/2020-09-01-introducing-github-container-registry/ Try using the GitHub Container Registry (henceforth, ghcr) released on 9/1. Currently (2020/09/03) it is a public beta version, so it is subject to change.
Container image saved in Docker Hub, delete if not used for 6 months with free plan-Publickey Also, the specification has been changed so that containers that are not used in the free plan of Dockerhub will be deleted.
In other words "The demand for Docker Hub has increased and there are more restrictions, so if you have a free plan, use Github Container Registry."
--Registered on Github --Creating a personal access token --Packages have read, write, delete permissions
Log in to ghcr with the following command
dockerer login ghcr.io -u $OWNER #Github account name
Password: <Enter your personal access token as your password>
Login Succeeded
Migrate from Docker Hub with the following command
docker pull $OWNER/$IMAGE_NAME:$VERSION
docker tag $OWNER/$IMAGE_NAME:$VERSION ghcr.io/$OWNER/$IMAGE_NAME:$VERSION
docker push ghcr.io/$OWNER/IMAGE_NAME:$VERSION
Set the container image pushed to ghcr to Public and check that you can docker pull
docker pull ghcr.io/$OWNER/$IMAGE_NAME:$VERSION
Reference
Introduction to GitHub Container Registry
Public Beta of GitHub Container Registry Released-GitHub Blog
Recommended Posts