1

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?

RubbleFord
  • 7,456
  • 9
  • 50
  • 80

2 Answers2

0

I think that there is a problem with your Jenkins installation (or at least the PATH is not correctly set). Running it as root, even if not very clean can be done as you are running it inside a Docker. However it should still run as regular user.

Did you see this offical Docker Jenkins?

Same response that was made here. Best practices suggest one process per Docker (hence one Docker for Jenkins, one for Asp.net5, though I'm not really familiar with either one or the other). You may want to run your Jenkins service in one Docker. You may want to check this post from Jenkins.

Auzias
  • 3,638
  • 14
  • 36
  • Just to be clear, I'm not trying to run ASP.NET 5 apps from the same container, I'm making it available for the build process. The last part of the build job sends the output to docker hub. – RubbleFord Nov 30 '15 at 08:47
  • My jenkins install is based off the official docker image. I've just bashed into it to install some extra bits and pieces. – RubbleFord Nov 30 '15 at 08:48
  • Ok, sorry then but I don't understand your issue then. – Auzias Nov 30 '15 at 10:26
0

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.

RubbleFord
  • 7,456
  • 9
  • 50
  • 80