Kevin Smith
Kevin Smith

Reputation: 14436

Is it possible to build a Linux docker image on VSTS 2017 Hosted agent?

I've got a Dockerfile that pulls from a base image of microsoft/dotnet:2.0-runtime. When I do a build locally (on windows running Linux containers) I get a Linux docker image.

however, if we run the same build process on VSTS using a 2017 Hosted agent then we get a windows docker image.

Is it possible to build a Linux docker image on VSTS 2017 Hosted agent without having to use a Linux build agent?

Upvotes: 4

Views: 678

Answers (1)

Marina Liu
Marina Liu

Reputation: 38096

No, there is no way to build a Linux docker image with VSTS Hosted VS2017 agent. Hosted VS2017 agent can only build for Windows docker images.

The workarounds to build Linux docker image as below:

  • Build with Hosted Linux Preview agent
  • Build with private agent with your own windows machine

Upvotes: 5

Related Questions