简体   繁体   English

Azure DevOps 自托管构建代理 - Kaniko

[英]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.

相关问题 在 Service Fabric 中运行 Azure DevOps 自托管构建代理时“无法解析远程名称” - “The remote name could not be resolved” when running an Azure DevOps self-hosted build agent in Service Fabric 自托管构建代理无法连接到 Azure DevOps Services,无法建立 SSL 连接 - Self-hosted build agent cannot connect to Azure DevOps Services, SSL connection could not be established Azure DevOps 自托管容器实例中的代理-.network 规则 - Azure DevOps self-hosted agent in Container instance - network rules 在自托管的 Azure DevOps Agent 上安装 ChromeDriver - Installing ChromeDriver on self-hosted Azure DevOps Agent 将自托管建筑代理重定向到 Azure Devops 服务 - Redirect Self-Hosted Building Agent to Azure Devops Service Azure DevOps 自托管代理 - 如何复制云托管代理? - Azure DevOps Self-Hosted Agent - How to replicate cloud-hosted agents? 如何在自托管 Windows 代理上从 Azure DevOps 管道运行 Azure CLI 任务? - How to run Azure CLI tasks from an Azure DevOps Pipeline on a Self-Hosted Windows Agent? Azure DevOps 管道 - 如何通过自托管代理在 docker 容器中执行整个模板阶段 - Azure DevOps pipelines - how to execute a whole template stage in a docker container by a self-hosted agent 如何通过 bash 检查 Linux 上自托管 Azure DevOps 代理上正在运行的作业 - How to check running job on self-hosted Azure DevOps Agent on Linux via bash 从自托管的 Azure DevOps 代理访问存储在 AzureML 工作区中的 ML 模型 - Access ML-model stored in AzureML Workspace from self-hosted Azure DevOps agent
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM