We have a single azure pipelines yml that a pipelines that runs many different jobs for testing microservices. We have a single base docker container to make dependency loading much faster.
The problem is that this image gets downloaded for every stage. This defeats some of the point of using a docker container if we cant just reuse the image for different stages. Many times loading image might take 1-5 minutes per job/stage.
How can we use the same docker image throughout different stages without having to redownload it?
name: $(Date:yyyyMMdd)$(Rev:.r)
resources:
repositories:
- repository: self
containers:
- container: azure_pipelines_deploy2
image: azure_pipelines_deploy2:1.0.0
endpoint: acr_connection
trigger:
tags:
include: [feature/*]
pr:
autoCancel: True # indicates whether additional pushes to a PR should cancel in-progress runs for the same PR. Defaults to true
branches:
include: [ master ]
stages:
- stage: OneOfManyStages