Registry pull through cache multi-architecture


Let’s say you set up a registry pull through cache on a typical server that might be Ubuntu 22.04 64-bit Linux.

Will the cache serve multi-architecture docker images?

For example, if any alternative CPU architecture machine such as arm64, powerpc, s390x tries to pull an image will that work?

If another Operating System such as Microsoft WIndows uses the cache, will that work?

What would be methods to verify the operation? For example, using curl to query the registry, will it show alternate architecture info?

Which logs file would show the results?

A similar question was asked on stackoverflow: How does docker registry mirror works when request is from different CPU architectures? - Stack Overflow


That’s a great question. I have never thought of that. I could not find an answer in the Docker documentation, but I found this

  • When a multi-architecture image is pulled using a pull through cache rule, the manifest list and each image referenced in the manifest list are pulled to the Amazon ECR repository. If you only want to pull a specific architecture, you can pull the image using the image digest or tag associated with the architecture rather than the tag associated with the manifest list.

It is Amazon ECR, but it would be logical for a pull through cache to pull all the architectures. Otherwise it would always replace one image with another and make the cache almost useless.

The last sentence also makes sense. When you use a digest, that is unique, so it doesn’t need to cache all the architectures. The best would be of course if the registry cache could recognize the architecture you need and cache only that.

Since the cache is not on the client the client OS shouldn’t matter

Do you manage the pull-through cache? If it has a GUI, you could probably just check the stored architetcures, but to be honest I never tried a pull-through cache that way so I don’t know the answer. I would probably check the filesystem if I have access to it and read meta files in the layers somewhere.

What results? You mean whether it pulled all the architectures or not? No idea.