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