Public | Automated Build

Last pushed: 7 months ago
Short Description
Monolith with Jenkins & docker in docker support for building Node apps and composing docker images.
Full Description

Jenkins CI Server with Docker in Docker Support

This is a Jenkins CI server with docker in docker support (dind), espacially for building NodeJS applications and composing docker images. The main image is based on docker image from

Preinstalled build dependencies:

Running this container

You can run this container by:

docker run -d \
  -p 8080:8080 \
  -p 9000:9000 \
  --privileged \
  -e DOCKER_DAEMON_ARGS="-H tcp:// -H unix:///var/run/docker.sock" \
  --restart=always \
  -v /my/jenkins/home:/var/lib/jenkins \
  -v /my/sonarqube/home/conf:/var/lib/sonarqube-6.4/conf \
  -v /my/sonarqube/home/data:/var/lib/sonarqube-6.4/data \
  --name myJenkinsContainer \
  • runs the container;
  • maps the host port 8080 (jenkins) to the container port 8080;
  • maps the host port 9000 (sonarqube) to the container port 9000;
  • mount jenkins volume
  • mount sonarqube data and config dir volume
  • to connect to an docker deamon
  • sets an "always" restart policy;
    • adds your docker host to the container /etc/hosts file so that Jenkins can access the Docker API
  • names the image jenkins.


  • prevent NPM EACCES errors cause missing permissions on mounted volumes (e.g. on nodejs git dependencies)
    • the container contains a folder /var/npm/ (owner and group is jenkins).
    • you can set the npm cache directory to this folder by adding an jenkins build command npm config set cache /var/npm/cache
  • how-to persist my jenkins config?
    • add jenkins home (/var/lib/jenkins) volume on docker statup command.
    • All settings will be stored there
  • how-to ssh public key auth outside docker container?
    • create an .sshdirectory (permission 700) in your jenkins home directory and copy your private ssh key (permission 600)
Docker Pull Command