Nocklas
Nocklas

Reputation: 1367

Visual Studio Team Service - Build Docker image in one phase and use it in another phase

I'm creating a build flow in the Visual Studio Team Service portal where I want to achieve the following flow.

Agent phase 1 (1 agent)

Agent phase 2 (n agents)

I'm not sure about how I should reference the Docker container built in Phase 1 in my Dockerfile for Phase 2. My guess is that I might need to push it to ACR to fetch it in Phase 2?

Upvotes: 0

Views: 86

Answers (1)

Daniel Mann
Daniel Mann

Reputation: 59055

Unless you can guarantee that every build will run on the same server (not agent, since multiple agents can co-exist on one server), you need to push the image to a container registry of some kind before you use it in downstream builds or build phases.

Upvotes: 1

Related Questions