4
votes

I'm trying to use Azure Container Instances and I have a problem with long pulls of my image. It takes about 3 minutes for ACI to pull my image.

I've checked the Troubleshooting guide which says the following:

To ensure the fastest Windows container startup time, use one of the three most recent versions of the following two images as the base image: microsoft/windowsservercore or microsoft/nanoserver

My image is pretty simple and based of microsoft/windowsservercore:ltsc2016 as suggested in the Troubleshooting guide. Here is the Dockerfile and cirrusci/windowsservercore:2016 image itself.

I can see that if I just try to start microsoft/windowsservercore:ltsc2016, it takes just about 20 seconds to start it. So my guess is that microsoft/windowsservercore:ltsc2016 is really cached but just not the latest digest as the documentation claims. I wonder if there is any way to find out exact digests of images that ACI caches?

Note: I've tried to move the image from Docker Hub to Azure Container Registry in the same region as suggested. It didn't help much. It was still around 3 minutes to pull the image.

1
This is a known issue with various people asking for caching. No feedback as to when/if this is going to happen though feedback.azure.com/forums/602224-azure-container-instances/…Ishyc

1 Answers

2
votes

So if you comment out the Powershell part of your Dockerfile, so it creates a container with no changes from the base, does that pull in 20 seconds or 3 mins?

If it pulls in 20 seconds then it is just your file system changes that are causing the slowdown, but if it takes 3 mins then that would prove that Azure has some cached containers ready to go and you might be better off spinning up one of those base containers, and then calling your powershell script directly onto it. It looks like that script would run pretty quickly.

That will also save you from having a registry at all.