1,charles 代理的坑
[5/6] RUN apk add –update mysql-client jq && rm -rf /var/cache/apk/*: #8 0.257 fetch https://mirrors.aliyun.com/alpine/v3.13/main/x86_64/APKINDEX.tar.gz #8 0.475 274903771976:error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed:ssl/statem/statem_clnt.c:1913: #8 0.480 ERROR: https://mirrors.aliyun.com/alpine/v3.13/main: Permission denied #8 0.480 WARNING: Ignoring https://mirrors.aliyun.com/alpine/v3.13/main: No such file or directory #8 0.480 fetch https://mirrors.aliyun.com/alpine/v3.13/community/x86_64/APKINDEX.tar.gz #8 0.661 274903771976:error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed:ssl/statem/statem_clnt.c:1913: #8 0.665 ERROR: https://mirrors.aliyun.com/alpine/v3.13/community: Permission denied #8 0.665 WARNING: Ignoring https://mirrors.aliyun.com/alpine/v3.13/community: No such file or directory #8 0.669 ERROR: unable to select packages: #8 0.674 jq (no such package): #8 0.674 required by: world[jq] #8 0.674 mysql-client (no such package): #8 0.674 required by: world[mysql-client]
找了很多原因,原来是本地charles 代理有问题,关闭代理,问题解决了
在构建基础镜像时为了加速alpine系统的组件更新,使用了阿里云的镜像
https://blog.csdn.net/john1337/article/details/113850804
docker登录私库时提示 x509: certificate signed by unknown authority
打开daemon.json
加入insecure-registries
https://blog.csdn.net/liusf1993/article/details/102508663
https://blog.csdn.net/qq_41086588/article/details/90107434
sudo vi /etc/docker/daemon.json
加入insecure-registries
{
“insecure-registries”:[“私库地址”]
}
https://www.jianshu.com/p/1d35c1c48107