On your docker config file, add the mirror:
{
// other properties omitted, change the server name to your server
"registry-mirrors": [
"https://myserver.local"
]
}
version: '3.7' | |
services: | |
dockerregistrymirror: | |
container_name: docker-registry-mirror | |
image: registry:2 | |
ports: | |
- "443:443" | |
volumes: | |
- ./data/docker/var/lib/registry:/var/lib/registry | |
- ./data/certs:/certs | |
environment: | |
- TZ=America/Sao_Paulo | |
- REGISTRY_PROXY_REMOTEURL=https://registry-1.docker.io | |
- REGISTRY_HTTP_ADDR=0.0.0.0:443 | |
- REGISTRY_HTTP_TLS_CERTIFICATE=/certs/my.crt | |
- REGISTRY_HTTP_TLS_KEY=/certs/my.key | |
- REGISTRY_STORAGE_DELETE_ENABLED=true | |
restart: always |
On your docker config file, add the mirror:
{
// other properties omitted, change the server name to your server
"registry-mirrors": [
"https://myserver.local"
]
}