From 44d7bb0c8501b3b4e4d0f19ee88b8ab10e6d1fcf Mon Sep 17 00:00:00 2001 From: Simon Cornet Date: Fri, 8 May 2026 09:13:58 +0200 Subject: [PATCH] fix: zot config with pull through --- templates/zot/config.json.j2 | 53 ++++++++++++++++++++++-------------- 1 file changed, 32 insertions(+), 21 deletions(-) diff --git a/templates/zot/config.json.j2 b/templates/zot/config.json.j2 index 164019b..1129682 100644 --- a/templates/zot/config.json.j2 +++ b/templates/zot/config.json.j2 @@ -1,27 +1,7 @@ { "distSpecVersion": "1.1.1", "storage": { - "rootDirectory": "/var/lib/zot", - "subPaths": { - "/dockerhub": { - "rootDirectory": "/var/lib/zot/dockerhub", - "mirror": { - "registries": ["https://registry-1.docker.io"], - "remoteURL": "https://registry-1.docker.io", - "onDemand": true, - "tlsVerify": true - } - }, - "/ghcr": { - "rootDirectory": "/var/lib/zot/ghcr", - "mirror": { - "registries": ["https://ghcr.io"], - "remoteURL": "https://ghcr.io", - "onDemand": true, - "tlsVerify": true - } - } - } + "rootDirectory": "/var/lib/zot" }, "http": { "address": "127.0.0.1", @@ -39,6 +19,37 @@ "cve": { "updateInterval": "24h" } + }, + "sync": { + "enable": true, + "registries": [ + { + "urls": ["https://registry-1.docker.io"], + "onDemand": true, + "tlsVerify": true, + "maxRetries": 3, + "retryDelay": "5m", + "content": [ + { + "prefix": "**", + "destination": "/dockerhub" + } + ] + }, + { + "urls": ["https://ghcr.io"], + "onDemand": true, + "tlsVerify": true, + "maxRetries": 3, + "retryDelay": "5m", + "content": [ + { + "prefix": "**", + "destination": "/ghcr" + } + ] + } + ] } } }