A complete setup for running a private Docker registry with automated hot/cold storage management using Hetzner Storage Box.
docker run -it --privileged \
-v /var/run/docker.sock:/var/run/docker.sock \
-v /mnt:/mnt \
-v /opt:/opt \
domaineering/registry-setup:latest \
/setup/fullsetup.sh
You'll be prompted for:
Hot Storage: /opt/docker-registry/data/hot
Cold Storage: /mnt/storagebox/docker-registry
cat > /etc/docker/daemon.json << EOF
{
"insecure-registries": ["YOUR_SERVER_IP:5000"]
}
EOF
systemctl restart docker
docker tag your-image:tag YOUR_SERVER_IP:5000/your-image:tag
docker push YOUR_SERVER_IP:5000/your-image:tag
docker pull YOUR_SERVER_IP:5000/your-image:tag
The setup includes several monitoring tools:
# Check registry status and storage usage
/opt/docker-registry/scripts/monitor.sh
# View migration logs
tail -f /var/log/registry-migration.log
# View cache manager logs
docker compose logs -f cache-manager
/opt/docker-registry/scripts/monitor.sh: Status and storage monitoring/opt/docker-registry/scripts/migrate-storage.sh: Manual migration to cold storage/opt/docker-registry/scripts/cache-manager.sh: Handles retrieval from cold storagePush failures:
Slow pulls:
Storage issues:
du -sh /opt/docker-registry/data/hotdu -sh /mnt/storagebox/docker-registrytail -f /var/log/registry-migration.logFor issues and feature requests, please visit: [GitHub Repository URL]
MIT License - feel free to use and modify as needed.
The image has been successfully built and pushed to your Docker Hub! You can verify it at docker.io/domaineering/registry-setup.
However, to actually use this setup on a new server, you would:
Pull and run the setup container:
docker run -it --privileged
-v /var/run/docker.sock:/var/run/docker.sock
-v /mnt:/mnt
-v /opt:/opt
domaineering/registry-setup:latest
/setup/fullsetup.sh
The container will prompt for: Storage Box username Storage Box hostname Authentication method choice A few notes: The --privileged flag is needed for mounting the storage box We mount several host directories to persist the setup The setup will configure the host system through these mounts Would you like me to: Test the container on a fresh system to verify it works? Add better documentation to the Docker Hub description? Create a simpler version that doesn't require privileged mode? Let me know what you'd like to focus on next!
Now you can: Login to push/pull: docker login 188.245.235.6:5000 View and manage images at: http://188.245.235.6:8080 Add descriptions and metadata through the web interface Would you like me to:
Content type
Image
Digest
sha256:b700d913b…
Size
53.9 MB
Last updated
almost 2 years ago
docker pull domaineering/registry-setup