From 80af7fc12580dbdf91f7327b6d5dd6e6e1ee4ec8 Mon Sep 17 00:00:00 2001 From: Changliang Wu <44141526+wu-cl@users.noreply.github.com> Date: Sat, 27 May 2023 10:32:46 +0800 Subject: [PATCH] feat: support configure docker insecure registry with env (#2606) --- runner/entrypoint-dind.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/runner/entrypoint-dind.sh b/runner/entrypoint-dind.sh index 78356bb5..56bd6e85 100755 --- a/runner/entrypoint-dind.sh +++ b/runner/entrypoint-dind.sh @@ -23,6 +23,10 @@ fi if [ -n "${DOCKER_REGISTRY_MIRROR}" ]; then jq ".\"registry-mirrors\"[0] = \"${DOCKER_REGISTRY_MIRROR}\"" /etc/docker/daemon.json > /tmp/.daemon.json && mv /tmp/.daemon.json /etc/docker/daemon.json fi + +if [ -n "${DOCKER_INSECURE_REGISTRY}" ]; then +jq ".\"insecure-registries\"[0] = \"${DOCKER_INSECURE_REGISTRY}\"" /etc/docker/daemon.json > /tmp/.daemon.json && mv /tmp/.daemon.json /etc/docker/daemon.json +fi SCRIPT dumb-init bash <<'SCRIPT' &