Merge remote-tracking branch 'upstream/master'
diff --git a/Dockerfile b/Dockerfile
index 6c04a9e..86b8a07 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -23,7 +23,7 @@
 # `/usr/share/jenkins/ref/` contains all reference configuration we want 
 # to set on a fresh new installation. Use it to bundle additional plugins 
 # or config file with your custom jenkins Docker image.
-RUN mkdir -p /usr/share/jenkins/ref/init.groovy.d
+RUN mkdir -p /usr/share/jenkins/ref/init.groovy.d; chown ${uid}:${gid} /usr/share/jenkins/ref/init.groovy.d
 
 ENV TINI_VERSION 0.13.2
 ENV TINI_SHA afbf8de8a63ce8e4f18cb3f34dfdbbd354af68a1
@@ -60,6 +60,17 @@
 
 ENV COPY_REFERENCE_FILE_LOG $JENKINS_HOME/copy_reference_file.log
 
+# Setup docker binary
+RUN apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D &&\
+    echo "deb https://apt.dockerproject.org/repo debian-jessie main" >/etc/apt/sources.list.d/docker.list && \
+    apt-get update && \
+    apt-get install --no-install-recommends -y docker-engine && \
+    apt-get clean && rm -rf /var/lib/apt/lists/*
+RUN adduser jenkins docker
+
+COPY SimpleThemeDecorator.xml  /tmp/org.codefirst.SimpleThemeDecorator.xml
+RUN chown ${user} /tmp/org.codefirst.SimpleThemeDecorator.xml
+
 USER ${user}
 
 COPY jenkins-support /usr/local/bin/jenkins-support
@@ -69,3 +80,5 @@
 # from a derived Dockerfile, can use `RUN plugins.sh active.txt` to setup /usr/share/jenkins/ref/plugins from a support bundle
 COPY plugins.sh /usr/local/bin/plugins.sh
 COPY install-plugins.sh /usr/local/bin/install-plugins.sh
+
+RUN /usr/local/bin/install-plugins.sh docker-workflow workflow-remote-loader workflow-scm-step simple-theme-plugin artifactory permissive-script-security gerrit-trigger
diff --git a/SimpleThemeDecorator.xml b/SimpleThemeDecorator.xml
new file mode 100644
index 0000000..0059197
--- /dev/null
+++ b/SimpleThemeDecorator.xml
@@ -0,0 +1,5 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<org.codefirst.SimpleThemeDecorator plugin="simple-theme-plugin@0.3">
+  <cssUrl>$JENKINSTHEME_CSS_URL</cssUrl>
+  <jsUrl>$JENKINSTHEME_JS_URL</jsUrl>
+</org.codefirst.SimpleThemeDecorator>
diff --git a/docker-compose.yml b/docker-compose.yml
index 5fe82ff..96d90f2 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -2,6 +2,8 @@
   build: .
   environment:
     JAVA_OPTS: "-Djava.awt.headless=true"
+    JENKINSTHEME_CSS_URL: http://185.22.97.168/material.css
+    JENKINSTHEME_JS_URL: http://185.22.97.168/material.js
   ports:
     - "50000:50000"
     - "8080:8080"
diff --git a/jenkins.sh b/jenkins.sh
index 0a3b96c..74e39cd 100755
--- a/jenkins.sh
+++ b/jenkins.sh
@@ -5,6 +5,13 @@
 echo "--- Copying files at $(date)" >> "$COPY_REFERENCE_FILE_LOG"
 find /usr/share/jenkins/ref/ -type f -exec bash -c '. /usr/local/bin/jenkins-support; for arg; do copy_reference_file "$arg"; done' _ {} +
 
+cat /tmp/org.codefirst.SimpleThemeDecorator.xml | envsubst > $JENKINS_HOME/org.codefirst.SimpleThemeDecorator.xml
+
+cat << EOF >>/usr/share/jenkins/ref/init.groovy.d/executors.groovy
+import jenkins.model.*
+Jenkins.instance.setNumExecutors(${JENKINS_NUM_EXECUTORS:-2})
+EOF
+
 # if `docker run` first argument start with `--` the user is passing jenkins launcher arguments
 if [[ $# -lt 1 ]] || [[ "$1" == "--"* ]]; then