遇到的问题
- 知道用户名和密码,无法登录镜像仓库
解决方案:生成认证文件,挂载进/kaniko/.docker/。比如
{
"auths": {
"https://your-registry.example.com": {
"auth": "base64-encoded-auth-string"
}
}
}
-
error checking push permissions -- make sure you entered the correct tag name, and that you are authenticated correctly, and try again: checking push permission for "base-registry.com/test/nginx:v1": POST https://base-registry.com/v2/devops/jdk8/blobs/uploads/: UNAUTHORIZED: unauthorized to access repository: devops/jdk8, action: push: unauthorized to access repository: devops/jdk8, action: push
解决方案:挂载 -v /root/.docker/ /kaniko/.docker/ -
error checking push permissions -- make sure you entered the correct tag name, and that you are authenticated correctly, and try again: checking push permission for "base-registry.com/test/nginx:v1": creating push check transport for base-registry.zhonganinfo.com failed: Get "https://base-registry.com/v2/": tls: failed to verify certificate: x509: certificate signed by unknown authority
解决方案:添加参数--skip-tls-verify[2] -
error building image: error building stage: failed to get filesystem from image: error calling stat on /var/spool/mail.: stat /var/spool/mail: too many levels of symbolic links
解决方案:添加参数--ignore-path=/var