A minimal local Docker image pull-through cache built with Sonatype Nexus Repository and Caddy.
The goal is simple: cache Docker images locally so repeated pulls do not need to download the same image from Docker Hub again.
Docker Client
│
│ HTTPS
▼
docker.localhost
│
▼
Caddy
│
│ HTTP :8082
▼
Nexus Repository
│
▼
docker-proxy
│
▼
Docker Hub
- Nexus Repository — Docker pull-through cache
- Caddy — local HTTPS reverse proxy
- Docker — image client
- Docker Hub — upstream registry
The setup intentionally uses as few components as possible.
git clone https://github.com/irvaniamirali/docker-registry-cache.git
cd docker-registry-cacheStart the stack manually:
docker compose up -dStop it:
docker compose downThe stack does not use a Docker restart policy. Nexus and Caddy therefore do not automatically start when Docker Desktop starts.
Configure the local hostname:
./scripts/setup-local.shThe registry will eventually be available at:
https://docker.localhost