Docker Registry Operations

Use when pushing/pulling/managing registry images.

LoopyLuci Updated 1 repo stars

File contents

Docker Registry Operations

Working with image registries.

Auth

docker login
docker login ghcr.io -u USER --password-stdin < token.txt
docker login myregistry.com:5000 -u admin -p password

Tag & Push

docker tag myapp:latest myrepo/myapp:latest
docker push myrepo/myapp:latest
docker push --all-tags myrepo/myapp

Pull

docker pull nginx:alpine
docker pull ghcr.io/owner/image:tag

Cross-Registry

docker pull oldreg.com/myapp:latest
docker tag oldreg.com/myapp:latest newreg.com/myapp:latest
docker push newreg.com/myapp:latest

Multi-Arch

docker buildx build --platform linux/amd64,linux/arm64 \\
    -t myrepo/myapp:latest --push .

Pitfalls

  • Tags are mutable -- use @sha256: for production
  • Docker Hub rate limits anonymous pulls
  • GC doesn't free disk until blob deletion

LoopyLuci/Skills/tree/main/skills/docker-registry-operations commit a2ae1a22c9

Frequently asked questions

npx skillmds@latest add loopyluci/docker-registry-operations