Is it possible to create a windows docker image (local) identical to the shared windows runner?

I have been able to use shared windows runners to perform some CI/CD jobs/pipelines on some test projects. I was looking at GitLab.org / CI-CD / shared-runners / images / gcp / windows-containers · GitLab and trying to see if there is a way to create a local docker container that would be essentially the same as a shared windows runner (with all of the chocolatey packages installed, visual studio build tools, etc.). I am running Windows 10 and using Docker desktop. I thought there might be a dockerfile that could build up the VM from a windows docker image, etc. However the only dockerfile-like file that I found doesn’t seem to do that. I am new to both gitlab and CI/CD, but I am wondering if this is possible.

I know it would be possible in theory to start with a Base docker image of Windows, and then install the vistual studio build tools, the chocolatey packages etc. and make my own image. But I am looking to save some time by leveraging the process used for the shared windows runners.

Any ideas or guidance ? @steveazz do you have any thoughts on this ?

If you can find the code, or if there’s an existing image, you should be able to use that. For an existing image, you can use FROM in a new Dockerfile and then change it as you see fit.

I see there hasn’t been much traffic on this thread in a while. I’m also interested in using the GL Windows image as a base image to build my Windows CI images on.

FWIW, I maintain some official Linux images for testing various versions of Python. Based on Ubuntu 20.04, I install the latest active (and a separate image that also contains some EOL’d versions) versions of Python, plus a few helpful tools. I run CI on these images in my open source Python libraries that I maintain on GL. It all works great.

I’d like to do the same on Windows. Unfortunately, right now I have to install the available Python Windows distributions on the GL Windows image at CI time, which means my Windows jobs are always lagging way behind. They’re clearly the slowest part of my CI. If I could make some Windows images with the same set of tools and upload them to my container registry, my CI would go much faster.

Any thoughts would be much appreciated!