CI:dind daemon 配置国内 registry mirror(docker.io 直连被墙导致拉 node 基础镜像 EOF)
This commit is contained in:
@@ -59,6 +59,10 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories
|
sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories
|
||||||
apk add --no-cache git bash >/dev/null
|
apk add --no-cache git bash >/dev/null
|
||||||
|
# dind daemon 配置国内 registry mirror(docker.io 直连不可达)
|
||||||
|
mkdir -p /etc/docker
|
||||||
|
printf '{"registry-mirrors":["https://docker.m.daocloud.io","https://docker.1ms.run"]}' \
|
||||||
|
> /etc/docker/daemon.json
|
||||||
dockerd --host=unix:///var/run/docker.sock >/tmp/dockerd.log 2>&1 &
|
dockerd --host=unix:///var/run/docker.sock >/tmp/dockerd.log 2>&1 &
|
||||||
for i in $(seq 1 30); do docker info >/dev/null 2>&1 && break; sleep 1; done
|
for i in $(seq 1 30); do docker info >/dev/null 2>&1 && break; sleep 1; done
|
||||||
docker info --format 'dind 就绪: {{.ServerVersion}}'
|
docker info --format 'dind 就绪: {{.ServerVersion}}'
|
||||||
|
|||||||
Reference in New Issue
Block a user