是否可以在VSTS 2017托管代理上构建Linux docker镜像?

时间:2018-06-14 10:49:33

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

我有一个Dockerfile来自microsoft/dotnet:2.0-runtime的基本图像。当我在本地进行构建时(在运行Linux容器的Windows上),我得到了一个Linux docker镜像。

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

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

1 个答案:

答案 0 :(得分:4)

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

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

  • 使用托管Linux预览代理构建
  • 使用您自己的Windows机器构建private agent
相关问题