Docker Support for the New GitHub Container Registry
November 2024 update: Learn about the upgraded Docker plans and choose the best Docker Subscription for you. Simpler, more value, better development and productivity.
Read our Docker Desktop release collection to learn about our latest enhancements and innovations.
—
Docker and GitHub continue to work together to make life easier for developers. GitHub today announced a new container registry: GitHub Container Registry. GitHub and Docker both occupy essential components in the developer workflow for building and deploying cloud native applications so we thought we would provide some insight into how the new tooling benefits developers.
Found at ghcr.io, the new GitHub registry adds support for anonymous pulls and decouples git repositories permissions from container registry’s permissions. This allows projects to have private git repositories with a public container registry or vice versa. Other features like OCI compliance, Helm charts, and support for GITHUB_TOKEN are expected later.
The GitHub Container Registry was built with Docker in mind so your Docker Engines and Docker Desktops will seamlessly work with this new registry. Let’s take a look at this in action over at our upcoming Docker Login GitHub Action:
name: ci
on:
push:
branches: master
jobs:
login:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v2
-
name: Login to GitHub Package Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GHCR_TOKEN }}
That is all you need to do. When you compare this against the the job for a GitHub packages repository you just needed to update two lines:
registry: docker.pkg.github.combecomesregistry: ghcr.ioFourteen fewer characters to type, FTW.
password: ${{ secrets.GITHUB_TOKEN }}becomes password:${{ secrets.GHCR_TOKEN }}. Unfortunately what this means is the automatically generated GITHUB_TOKEN will not work for authentication for the initial release. You will have to go to GitHub, generate a personal access token, and create a GitHub Action secret. You can read more about this in the documentation here. We believe thatGITHUB_TOKENsupport will be released later.
Once that is done you are ready to go. You can continue on to docker build and docker push to your heart’s content. There are lots of different use cases across the container lifecycle. For a more complete example from CI to production, using both GitHub Container Registry and Docker Hub, including a bonus preview of our upcoming Docker Buildx action, go to my example repository.
From the 11 billion images pulled a month to the 7 million developers Docker Hub will always be there for the developer. Portability and choice have always been core to the Docker experience. We are always excited to work with our friends at GitHub to make the best possible experience for our customers, users, and community.
If you are ready to get started with Docker, we offer free plans for individual developers and teams just starting out. Get started with Docker today.
About the Authors
Chad Metcalf is the Chief Architect Cloud Alliances and Strategy fo Docker.
Related Posts
-
May 12, 2026
Docker AI Governance: Unlock Agent Autonomy, Safely
Introducing Docker AI Governance: centralized control over how agents execute, what they can reach on the network, which credentials they can use, and which MCP tools they can call, so every developer in your company can run AI agents safely, wherever they work. Your laptop is the new prod Agents are the biggest productivity unlock…
Srini SekaranRead now
-
Jun 16, 2026
Docker Content Trust: Retirement and Migration Guidance
Docker Content Trust (DCT) and the Notary v1 service at notary.docker.io are being fully retired (first announced in July of 2025). This blog explains what is changing, who is affected, and how to move to modern alternatives.
Julia WilsonandAditya TripathiRead now
-
Jun 15, 2026
Docker joins the Athena coalition: a cross-industry collaboration for supply chain security
AI is lowering the bar for supply chain attacks. Docker is joining the Athena alliance, a cross-industry effort to coordinate the defense of open source, building on our work to give every developer secure-by-default tools and our track record of sharing signals across the ecosystem.
Tushar JainRead now
-
Jun 11, 2026
Docker Hardened Images enhanced vulnerability scanning with Docker and Aikido
Aikido now scans Docker Hardened Images (DHI) with built-in VEX support. Vulnerabilities that Docker has verified as non-exploitable drop out of the queue automatically, so developers spend their time on findings that actually matter. This post walks through what changed, why it matters, and how users can benefit from the new integration. Why teams are…
Dan StelzerandBjorn HovdRead now
