[英]Azure DevOps self-hosted build agent - Kaniko
We need to build docker images using self-hosted linux agent which is deployed as docker container (in Azure Container Instances).我们需要使用自托管 linux 代理构建 docker 图像,该代理部署为 docker 容器(在 Azure 容器实例中)。
As of now, the agent is Ubuntu image, however to enable building images inside this container I thought of using Kaniko image.到目前为止,代理是 Ubuntu 图像,但是为了在这个容器内构建图像,我想到了使用Kaniko图像。 However, I haven't figured out how to run Kaniko image without executing the kaniko itself right away (as we need to run devops agent primarily and run kaniko on-demand).但是,我还没有想出如何在不立即执行 kaniko 本身的情况下运行 Kaniko 图像(因为我们需要主要运行 devops 代理并按需运行 kaniko)。
Any hints?有什么提示吗? Or better ideas how to build docker images in running docker container?或者更好的想法如何在运行 docker 容器中构建 docker 图像?
Solved with following code, however Kaniko does not work as expected when running inside my container (tested the same parameters with kaniko inside my container and in default container and in my container does not work (cannot authenticate to ACR)).使用以下代码解决,但是在我的容器内运行时 Kaniko 无法按预期工作(在我的容器内和默认容器中使用 kaniko 测试了相同的参数,并且在我的容器中不起作用(无法向 ACR 进行身份验证))。
Might end up with the VMSS DevOps agent...最终可能会使用 VMSS DevOps 代理...
FROM whatever-base-image
...
COPY --from gcr.io/kaniko-project/executor /kaniko/executor /kaniko/executor
Ref: https://github.com/GoogleContainerTools/kaniko/issues/2058#issuecomment-1104666901参考: https://github.com/GoogleContainerTools/kaniko/issues/2058#issuecomment-1104666901
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.