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?

4
  • 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: github.com/jenkinsci/docker/blob/…
    – 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 1:02
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 slaves .

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

1

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.