'Speed up the Azure Cosmos DB Emulator Task Group in Azure Devops Pipeline

I have followed the guide here and I am using the Azure Cosmos DB Emulator task group in an Azure DevOps pipeline to successfully run my integration tests.

See here for how my pipeline is setup

The problem comes when on each run it takes approximately 20 mins to download the emulator. This means with multiple pushes to a branch plus a merge build it can take up a lot of time/resource.

Does anybody know if/how it would be possible to speed this up? I suppose what I actually want to do is cache the emulator image that the task group is downloading each time. However it always seems to pull latest.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source