1

I want to build an Windows docker image on azure piplines. Pulling the base image is taking up to 20 minutes. How can i speed up the docker pull?

  • I want to use the azure hosted pipline
  • I cannot use the cached images on the agent

Example Script based on Pipline Resources:

trigger:
- '*'

resources:
  containers:
    - container: sdk  
      image: mcr.microsoft.com/dotnet/framework/sdk:4.8-20190611-windowsservercore-ltsc2019
    - container: runtime
      image: mcr.microsoft.com/dotnet/framework/runtime:4.8-20190611-windowsservercore-ltsc2019

jobs:
- job: pullSdk
  pool:
    vmImage: 'windows-2019'
    container: sdk
  
- job: pullRuntime
  pool:
    vmImage: 'windows-2019'
  container: runtime
Manuel
  • 88
  • 8
  • Not get your response for several days, would you please share your latest information about this issue? If you have any concern, feel free to share it here. – Hugh Lin Jul 10 '20 at 09:19
  • I need to install Microsoft Visual C++ 2005 Redistributable. And it looks like installation does not work on this image. In the documentation of these images is also mentioned that there are issues with executing binaries. All in all i setup my own build agent to have much faster builds. – Manuel Jul 13 '20 at 09:37
  • 1
    Indeed, to speed up docker pull, the best way is to setup self-hosted agent. – Hugh Lin Jul 13 '20 at 09:47

1 Answers1

3

If using a hosted agent, the only speedup method I can think of is to use the cached docker image of the hosted agent. This can save a lot of time.

enter image description here

enter image description here

For a faster build, the best practice is to setup a self-hosted agent .

In addition, you could add your feature request on our UserVoice site, which is our main forum for product suggestions. After suggest raised, you can vote and add your comments for this feedback. The product team would provide the updates if they view it.

Hugh Lin
  • 17,829
  • 2
  • 21
  • 25