Hi,
I’m trying to figure out if I can use GitLab CI with docker runners to build .NET applications using MSBuild, but I haven’t had much luck. For now, I’ve been testing with Windows Server (Core) 2016 and the windowsserver core docker image. A summary of what I’ve done so far:
- Install a Windows Server (Core) 2016 evaluation (as the host) in a virtual machine.
- Enable RDP on the host.
- Install Docker using a mix of the instructions here and here.
- Install GitLab CI Multi Runner.
- Register a runner. This doesn’t seem to work via Remote PowerShell. It works when using RDP.
- Configure the host to use TCP instead of sockets. The
Prepare Container Host
section of these instructions gives and idea of what I’ve done. - Configure the runner to communicate with the host via TCP. It’s the
host
parameter of therunners.docker
config described here. Note, the Windows firewall on the host needs to allow the traffic. - Run the
windowsservercore
image, configure it, and commit it as a new image.
At that point, I tried to use the image. I ended up with an error about needing the xz
command. I doubt it’s the correct way of doing things, but I can get past the error by manually installing xz for Windows.
Then I run into an error that I can’t figure out how to deal with:
Using Docker executor with image ryan/msbuild:1 ...
ERROR: Failed to create container volume for /builds/examples API error (500): re-exec error: exit status 1: output: link \\?\C:\ProgramData\docker\windowsfilter\2e40e03daf7fb5685468c4a25e1a683ac350ca87068f013f00407fa6e2de3aae\usr\share\terminfo\2\2621 \\?\C:\ProgramData\docker\windowsfilter\2e40e03daf7fb5685468c4a25e1a683ac350ca87068f013f00407fa6e2de3aae\usr\share\terminfo\2\2621a: Cannot create a file when that file already exists.
ERROR: Preparation failed: API error (500): re-exec error: exit status 1: output: link \\?\C:\ProgramData\docker\windowsfilter\2e40e03daf7fb5685468c4a25e1a683ac350ca87068f013f00407fa6e2de3aae\usr\share\terminfo\2\2621 \\?\C:\ProgramData\docker\windowsfilter\2e40e03daf7fb5685468c4a25e1a683ac350ca87068f013f00407fa6e2de3aae\usr\share\terminfo\2\2621a: Cannot create a file when that file already exists.
I’m fairly sure that’s an error from the multi runner since I can run the image by hand without issue. However, I’m not sure if it’s caused by a configuration problem, missing dependencies, or a bug. Any ideas?
I’m hoping to use a docker runner with the windowsservercore
image to build a Universal Windows Platform application. I’m only evaluating UWP, so my requirements are fairly flexible. I’d be open to alternate approaches / suggestions.
Also, GitLab CI Multi Runner seems to rely on running Linux shell scripts. Is there an expectation of having the Windows Subsystem for Linux available? The WSL is not usable on Windows Server. I’d be willing to force install it, at least for testing, if someone knows how.