问题
在构建docker镜像时,执行apk update时,出现以下问题
[INFO] WARNING: Ignoring APKINDEX.8d3fc6bf.tar.gz: No such file or directory
[INFO] fetch https://mirrors.aliyun.com/alpine/v3.6/community/x86_64/APKINDEX.tar.gz
[INFO] [91mERROR: https://mirrors.aliyun.com/alpine/v3.6/community/: temporary error (try again later)
[INFO] WARNING: Ignoring APKINDEX.53d054b0.tar.gz: No such file or directory
[INFO] 2 errors; 17 distinct packages available
[ERROR] The command '/bin/sh -c set -xe && echo -e 'https://mirrors.aliyun.com/alpine/v3.6/main/\nhttps://mirrors.aliyun.com/alpine/v3.6/community/' > /etc/apk/repositories && apk update && apk upgrade && apk --no-cache add ttf-dejavu fontconfig' returned a non-zero code: 2
解决方法
排除非网络问题导致后,尝试重启docker后,顺利解决以上问题。
systemctl restart docker