【问题标题】:Is it possible to build a Linux docker image on VSTS 2017 Hosted agent?是否可以在 VSTS 2017 托管代理上构建 Linux docker 映像?
【发布时间】:2018-11-24 03:02:19
【问题描述】:

我有一个 Dockerfile,它从microsoft/dotnet:2.0-runtime 的基本映像中提取。当我在本地(在运行 Linux 容器的 Windows 上)进行构建时,我会得到一个 Linux docker 映像。

但是,如果我们使用 2017 托管代理在 VSTS 上运行相同的构建过程,那么我们会得到一个 windows docker 映像。

是否可以在 VSTS 2017 托管代理上构建 Linux docker 映像而无需使用 Linux 构建代理?

【问题讨论】:

  • 为什么不使用 Linux 构建代理?有托管 Linux 构建代理。
  • 他们在“预览”中
  • 看起来他们将在接下来的几周内退出预览版:docs.microsoft.com/en-us/vsts/release-notes/2018/…
  • 此时,ubuntu 代理已不在预览状态,可以构建 linux docker 镜像。

标签: linux docker azure-devops azure-pipelines docker-build


【解决方案1】:

不,没有办法使用 VSTS Hosted VS2017 代理构建 Linux docker 映像。托管的 VS2017 代理只能为 Windows docker 镜像构建。

构建Linux docker镜像的解决方法如下:

  • 使用托管 Linux 预览代理构建
  • 在您自己的 Windows 机器上使用 private agent 构建

【讨论】:

    猜你喜欢
    • 2018-11-17
    • 1970-01-01
    • 1970-01-01
    • 2016-10-24
    • 2017-07-26
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多