7

I'm trying to set up CI on AWS using the Jenkins image from the Docker hub. I've gotten a few hours into the process (configuring for a Node project), and I've now realized that a few of my npm dependencies require make in order to build. The Docker image doesn't have make, nor does it have sudo, so it looks like I'm unable to apt-get install make. Is there another way to get make without having to recreate the image with a Dockerfile that grants root access?

Jacob
  • 73
  • 1
  • 1
  • 6
  • Do you know the root password? – Paul May 19 '15 at 23:37
  • @Paul I do not. The image was generated with this Dockerfile, however, if that gives any clues: https://github.com/jenkinsci/docker/blob/8f909abee98247ad482efb6d21833e2054e3e9de/Dockerfile – Jacob May 19 '15 at 23:57
  • I think you have to modify the Dockerfile. However, you can try to report your case as an enhancement -- don't specify `USER` in Dockerfile, but in the startup script. – xuhdev May 21 '15 at 21:26
  • @xuhdev Good advice. I've submitted an issue to the Jenkins Docker repo. – Jacob May 22 '15 at 01:02

2 Answers2

8

The image is a base official image, it has the minimal tools required for Jenkins to work, by design. There are people that want make, some want multiple versions of ruby, java, etc, some don't want anything in there because they use agents .

It also doesn't run as root for security reasons following the Docker official images guidelines

Check this to extend the image and install more tools

csanchez
  • 294
  • 2
  • 6
3

you can run this command, get bash in your container and then install whatever you want: docker exec -it -u root jenkins bash otherwise you can configure it into your dockerfile