Reading Time: 2 minutes

Docker: Jenkins Build Server on Windows Server Core

Big fan of Jenkins! I’ve really enjoyed the flexibility that this CI server provides. While it’s easy to run a Linux container with Jenkins and do .NET Core builds it’s not possible to build traditional ASP.NET projects… unless you install Mono.. but I could never get that to work. After contemplating my options, I decided to try and set up Jenkins on a Docker Windows Server Core image.

This script installs ASP.NET, .NET Core, Java, and Jenkins on a Windows Server Core image.

GitHub: Docker Windows Server Jenkins

WARNING: this post is a work in progress. The current Dockerfile builds and creates a Windows Server with Jenkins but there are still some issues with this process.

Dockerfile

This dockerfile builds off the Windows Server Core image.

Entrypoint

I ran into an issue where executing the jar file did not keep the process running in the foreground. I’m not sure why… However, for the sake of time I used ping -t localhost to keep the container running. This seemed to work.

Building a .NET Core Project in Jenkins

Building an ASP.NET Core Project in Jenkins