I have just setup a new gitlab instance and a new gitlab runner to connect to it. Gitlab is running on ubuntu (8.12.1) and gitlab runner is on Windows 10 setup as a docker executor.
This is the output of the build:
Running with gitlab-ci-multi-runner 1.6.0 (01b3ea1)Using Docker executor with image node:6.6.0 ...ERROR: Preparation failed: Get http://unix.sock/v1.18/version: dial unix /var/run/docker.sock: socket: An address incompatible with the requested protocol was used.Will be retried in 3s ...... REPEATED ...ERROR: Build failed (system failure): Get http://unix.sock/v1.18/version: dial unix /var/run/docker.sock: socket: An address incompatible with the requested protocol was used.
Docker is installed and if I use a terminal window I can use docker. The same error appears when used as a service or as gitlab-runner run.
Does Gitlab support Windows+Docker runners - the documentation I have read states "anywhere that can run docker"? Or any idea on what the cause of this is?
Designs
An error occurred while loading designs. Please try again.
Child items
0
Show closed items
GraphQL error: The resource that you are attempting to access does not exist or you don't have permission to perform this action
No child items are currently open.
Linked items
0
Link issues together to show that they're related or that one is blocking others.
Learn more.
I have not tried to use the feature on Windows 10 but from my initial reading, it is possible that on Windows 10, you will need to use Hyper-V based containers.
I'm not sure if "Hyper-V containers" are supported through GItlab CI transparently, as everything I've seen about the CI Runner thus far seems to indicate that only the Shell runner type works on Windows, not the docker container.
I can't even get the docker features of gitlab ci runner to BUILD for me on my windows 10 box. The full CI runner only builds for me when I build on Linux. Somehow I'd be surprised (but happy) to hear that yes, Docker containers can be used from a Gitlab CI Runner on Windows 10.
And If so, some special configuration steps may be required. I don't see any documentation on that.
I attempted to play a little bit with the DOCKER_HOST environment variable (for local builds) but no success.
If i set DOCKER_HOST to "npipe:////./pipe/docker_engine" i can connect to docker through docker itself but the gitlab-ci-multirunner does not understand this pipe.
I only became:
It would be nice when the gitlab-ci-multirunner understand the windows pipe to connect to docker engine on windows. So i can use a windows based container for my .NET CI builds.
As a happy accident, !301 (merged) would make gitlab-ci-multi-runner interpret and attempt to connect to Windows named pipes for docker. It's not a supported feature though, so there are no tests for it - I wouldn't expect it to be reliable, if it worked at all.
We're also quite some distance from being able to merge that branch, unfortunately. Still, I'll get it rebased against latest master and you can experiment with the build, if you'd like to!
Thanks for the hint @vladgo but now i get the following error:
Running with gitlab-ci-multi-runner 1.6.0 (01b3ea1)Using Docker executor with image windows-build-net462 ...ERROR: Preparation failed: API error (404): exec: "xz": executable file not found in %PATH%
I plan to play around with it. I am not exactly an expert Go dev but I have gitlab-ci-multi-runner building and debuggable on windows. The tests are known to fail on Windows and there is a separate task for that.
My level of docker knowledge is kind of weak, so I plan to play a bit with docker + gitlab-ci-multi-runner on Linux, and learn HOW IT WORKS and what output I can expect when I do various tasks. Then when outputs differ, I know I have work to do.
I wonder if Gitlab-ci-multi-runners could be built using Go-under-WindowsSubsystemForLinux (colloquially called "ubuntu or bash for windows") and be made to work with docker more easily that way.
I was hoping to run builds on Windows Server 2016 in docker containers. But I see it's not possible. After solving all issues mentioned here, I've run into another one:
ERROR: Failed to create container volume for /builds/djanosik API error (500): re-exec error: exit status 1: output: link \\?C:\ProgramData\docker\windowsfilter\e48244c547528f4ff4eb3cbe6a67be2dd49283698d6d2d7ef245d0002bb0d8af\usr\share\terminfo\2\2621 \\?\C:\ProgramData\docker\windowsfilter\e48244c547528f4ff4eb3cbe6a67be2dd49283698d6d2d7ef245d0002bb0d8af\usr\share\terminfo\2\2621a: Cannot create a file when that file already exists.
There might be an issue with the special linux image used by GitLab Runner. It won't run on Windows docker by default. Maybe it will run in Hyper-V container.
Please, make docker executor compatible with Windows containers. It's PITA to use the shell executor.
You have a third alternative. You can use VirtualBox runners where the CI Runner GO process runs OUTSIDE the VMs and SSHs into Bash inside Windows. That is reported to work some places in the issue tracker.
@Beuha I've created my own GitLab CI Runner that uses https://www.packer.io/ to spin up VMs on Azure. It's not working with Docker, but it's good enough. Maybe I will make it public in time.
@MMathiaut Good news is that Linux containers will be officially supported on Windows Server. And there is a chance Docker Machine will support Windows VMs and containers on Azure (see PR#3329). I hope GitLab will update CI runner to support Windows Server containers.