-
-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
support Linux containers when running on Windows VMs #3548
Comments
Alas the flags As per https://learn.microsoft.com/en-us/virtualization/windowscontainers/quick-start/set-up-environment, Docker Desktop is recommended on Windows 10/11 and Docker CE standalone (or Mirantis or containerd) on Windows Server 2016/2019/2022. It means that, in order to cover the CI case of "Windows build with Linux container", we need to use one of the following solutions:
if you have any other idea, please share! |
Tried a manual installation of Docker Desktop on a Windows 2022 (full, not a "core") server: succeeded with the UI enabled but I failed to have Docker Linux containers working. Gotta try with WSL preinstalled and initialized before Docker Desktop. going to backlog as no emergency here |
Another plugin might have this use case: jenkinsci/docker-workflow-plugin#331 |
Service(s)
ci.jenkins.io
Summary
It is not uncommon for a plugin to have some containers for tests and use the legacy
docker-fixtures
orTestContainers
However the containers are generally linux specific (e.g.
--platform=linux
) and this causes build errors when run on windows VMs.As it is useful to run the tests on Windows as well as Linux it would be helpful if there was a Windows VM that had been set to Linux containers (rather than the current Linux containers).
Current workaround is to use a specific container label in the
buildPlugins
(which actually broke and was just fixed a few hours ago)e.g. https://github.com/jenkinsci/distfork-plugin/blob/master/Jenkinsfile https://github.com/jenkinsci/docker-workflow-plugin/blob/d5d2e5c4007f7ea006152542b2bcbe0f1b2b08aa/Jenkinsfile#L1-L4 are 2 plugins that use this approach.
a windows VM can be switched between linux and windows containers with the command
"c:\Program Files\Docker\Docker\DockerCli.exe" -SwitchDaemon
untested (the help is broken) but
-SwitchLinuxEngine
may switch specifically to linux and-SwitchWindowsEngine
may likewise do the same for windows containers.Reproduction steps
No response
The text was updated successfully, but these errors were encountered: