遇到的问题
- 知道用户名和密码,无法登录镜像仓库
解决方案:生成认证文件比如
{
"auths": {
"https://your-registry.example.com": {
"auth": "base64-encoded-auth-string"
}
}
}
挂载进/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.zhonganinfo.com/devops/za-jdk8:test”: POST https://base-registry.zhonganinfo.com/v2/devops/za-jdk8/blobs/uploads/: UNAUTHORIZED: unauthorized to access repository: devops/za-jdk8, action: push: unauthorized to access repository: devops/za-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.zhonganinfo.com/devops/za-jdk8:test”: creating push check transport for base-registry.zhonganinfo.com failed: Get “https://base-registry.zhonganinfo.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