Search code examples
jenkinsdockerasp.net-corejenkins-docker

Building ASP.NET 5 with Jenkins inside a docker container


I'm trying to build an Asp.net 5 application with Jenkins. Jenkins is hosted inside a docker container (The image is based on the official jenkins docker image).

ASP.Net 5 has been installed using the ubuntu instructions into the container rooting in via docker exec.

When inside the container I can execute dnvm, dnu etc. however Jenkins shell scripts can't find the commands. dnvm upgrade has been run which I believe should make it available on the path.

The last resort I can think of trying it running Jenkins as root but that doesn't feel right to me.

Any ideas?


Solution

  • So in order to do this, I had to put the env vars that DNVM does on the command line into the jenkins build application (You can inject standard environment variables).

    In order to deal with multiple versions I installed dnvm in different states on different slaves and tagged the builds.