generated from container/tmpl
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
697 B
25 lines
697 B
FROM docker:20.10.17-dind
|
|
|
|
COPY switch-auth.sh /usr/local/bin/
|
|
|
|
RUN sed -i "s@https://dl-cdn.alpinelinux.org/@https://mirrors.huaweicloud.com/@g" /etc/apk/repositories; \
|
|
mkdir -p /etc/docker; \
|
|
echo $'{ \n\
|
|
"registry-mirrors": [ \n\
|
|
"https://ktrsh7na.mirror.aliyuncs.com" \n\
|
|
] \n\
|
|
}' >> /etc/docker/daemon.json; \
|
|
mkdir -p /root/.docker; \
|
|
echo $'{ \n\
|
|
"auths": { \n\
|
|
"repository.anxinyun.cn": { \n\
|
|
"auth": "YWRtaW46SGFyYm9yMTIzNDU=" \n\
|
|
}, \n\
|
|
"registry.cn-hangzhou.aliyuncs.com": { \n\
|
|
"auth": "==auth==" \n\
|
|
} \n\
|
|
} \n\
|
|
}' >> /root/.docker/config.json.temp; \
|
|
chmod +x /usr/local/bin/switch-auth.sh
|
|
|
|
|
|
|