Gitlab-Runner Docker-windows executor, have a way to pass isolation=hyperv

Description

We try to use gitlab-ci with a pool of Windows Server 1909 as runner using the docker-windows executor. On Windows, having the possibility to specify isolation=hyperv instead of process (the default) will help with some images we use that are not build for the latest version of windows server.

And when we want to upgrade our Windows Server version from 1903 to 1909, we actually need to rebuild all our image for supporting our new agent. When we know how long is it to build some image and how many storage it take (like an msbuild image is basically more than 5G and some of our build image took more than 30G and the build of this image tooks hours...)

Proposal

Have the ability to specify the isolation in the runner configuration or per jobs in the gitlab-ci.yml like image:entrypoint, we could have a image:isolation

Workaround

For now, we change the default behaviour on Windows Server and set the default isolation of Docker to hyperv from the daemon.json file:

{
  "exec-opts": [
    "isolation=hyperv"
  ]
}
Edited by Julien Maitrehenry