generated by update script
diff --git a/1.554.3/Dockerfile b/1.554.3/Dockerfile
new file mode 100644
index 0000000..b903400
--- /dev/null
+++ b/1.554.3/Dockerfile
@@ -0,0 +1,45 @@
+FROM java:openjdk-7u65-jdk
+
+RUN apt-get update && apt-get install -y wget git curl zip && rm -rf /var/lib/apt/lists/*
+
+ENV JENKINS_HOME /var/jenkins_home
+
+# Jenkins is ran with user `jenkins`, uid = 1000
+# If you bind mount a volume from host/vloume from a data container,
+# ensure you use same uid
+RUN useradd -d "$JENKINS_HOME" -u 1000 -m -s /bin/bash jenkins
+
+# Jenkins home directoy is a volume, so configuration and build history
+# can be persisted and survive image upgrades
+VOLUME /var/jenkins_home
+
+# `/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
+
+
+COPY init.groovy /usr/share/jenkins/ref/init.groovy.d/tcp-slave-angent-port.groovy
+
+ENV JENKINS_VERSION 1.554.3
+
+# could use ADD but this one does not check Last-Modified header
+# see https://github.com/docker/docker/issues/8331
+RUN curl -L http://mirrors.jenkins-ci.org/war-stable/$JENKINS_VERSION/jenkins.war -o /usr/share/jenkins/jenkins.war
+
+ENV JENKINS_UC https://updates.jenkins-ci.org
+RUN chown -R jenkins "$JENKINS_HOME" /usr/share/jenkins/ref
+
+# for main web interface:
+EXPOSE 8080
+
+# will be used by attached slave agents:
+EXPOSE 50000
+
+USER jenkins
+
+COPY jenkins.sh /usr/local/bin/jenkins.sh
+ENTRYPOINT ["/usr/local/bin/jenkins.sh"]
+
+# from a derived Dockerfile, can use `RUN plugin.sh active.txt` to setup /usr/share/jenkins/ref/plugins from a support bundle
+COPY plugins.sh /usr/local/bin/plugins.sh
diff --git a/1.554.3/init.groovy b/1.554.3/init.groovy
new file mode 100644
index 0000000..83c3a3d
--- /dev/null
+++ b/1.554.3/init.groovy
@@ -0,0 +1,9 @@
+import hudson.model.*;
+import jenkins.model.*;
+
+
+Thread.start {
+ sleep 10000
+ println "--> setting agent port for jnlp"
+ Jenkins.instance.setSlaveAgentPort(50000)
+}
diff --git a/1.554.3/jenkins.sh b/1.554.3/jenkins.sh
new file mode 100755
index 0000000..1bd0f85
--- /dev/null
+++ b/1.554.3/jenkins.sh
@@ -0,0 +1,30 @@
+#! /bin/bash
+
+# Copy files from /usr/share/jenkins/ref into /var/jenkins_home
+# So the initial JENKINS-HOME is set with expected content.
+# Don't override, as this is just a reference setup, and use from UI
+# can then change this, upgrade plugins, etc.
+copy_reference_file() {
+ f=${1%/}
+ echo "$f"
+ rel=${f:23}
+ dir=$(dirname ${f})
+ echo " $f -> $rel"
+ if [[ ! -e /var/jenkins_home/${rel} ]]
+ then
+ echo "copy $rel to JENKINS_HOME"
+ mkdir -p /var/jenkins_home/${dir:23}
+ cp -r /usr/share/jenkins/ref/${rel} /var/jenkins_home/${rel};
+ fi;
+}
+export -f copy_reference_file
+find /usr/share/jenkins/ref/ -type f -exec bash -c 'copy_reference_file {}' \;
+
+# if `docker run` first argument start with `--` the user is passing jenkins launcher arguments
+if [[ $# -lt 1 ]] || [[ "$1" == "--"* ]]; then
+ exec java $JAVA_OPTS -jar /usr/share/jenkins/jenkins.war $JENKINS_OPTS "$@"
+fi
+
+# As argument is not jenkins, assume user want to run his own process, for sample a `bash` shell to explore this image
+exec "$@"
+
diff --git a/1.554.3/plugins.sh b/1.554.3/plugins.sh
new file mode 100755
index 0000000..e0df32b
--- /dev/null
+++ b/1.554.3/plugins.sh
@@ -0,0 +1,17 @@
+#! /bin/bash
+
+# Parse a support-core plugin -style txt file as specification for jenkins plugins to be installed
+# in the reference directory, so user can define a derived Docker image with just :
+#
+# FROM jenkins
+# COPY plugins.txt /plugins.txt
+# RUN /usr/share/jenkins/plugins.sh /plugins.txt
+#
+
+REF=/usr/share/jenkins/ref/plugins
+mkdir -p $REF
+
+while read spec; do
+ plugin=(${spec//:/ });
+ curl -L ${JENKINS_UC}/download/plugins/${plugin[0]}/${plugin[1]}/${plugin[0]}.hpi -o $REF/${plugin[0]}.hpi;
+done < $1
diff --git a/1.555/Dockerfile b/1.555/Dockerfile
new file mode 100644
index 0000000..57b1725
--- /dev/null
+++ b/1.555/Dockerfile
@@ -0,0 +1,45 @@
+FROM java:openjdk-7u65-jdk
+
+RUN apt-get update && apt-get install -y wget git curl zip && rm -rf /var/lib/apt/lists/*
+
+ENV JENKINS_HOME /var/jenkins_home
+
+# Jenkins is ran with user `jenkins`, uid = 1000
+# If you bind mount a volume from host/vloume from a data container,
+# ensure you use same uid
+RUN useradd -d "$JENKINS_HOME" -u 1000 -m -s /bin/bash jenkins
+
+# Jenkins home directoy is a volume, so configuration and build history
+# can be persisted and survive image upgrades
+VOLUME /var/jenkins_home
+
+# `/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
+
+
+COPY init.groovy /usr/share/jenkins/ref/init.groovy.d/tcp-slave-angent-port.groovy
+
+ENV JENKINS_VERSION 1.555
+
+# could use ADD but this one does not check Last-Modified header
+# see https://github.com/docker/docker/issues/8331
+RUN curl -L http://mirrors.jenkins-ci.org/war-stable/$JENKINS_VERSION/jenkins.war -o /usr/share/jenkins/jenkins.war
+
+ENV JENKINS_UC https://updates.jenkins-ci.org
+RUN chown -R jenkins "$JENKINS_HOME" /usr/share/jenkins/ref
+
+# for main web interface:
+EXPOSE 8080
+
+# will be used by attached slave agents:
+EXPOSE 50000
+
+USER jenkins
+
+COPY jenkins.sh /usr/local/bin/jenkins.sh
+ENTRYPOINT ["/usr/local/bin/jenkins.sh"]
+
+# from a derived Dockerfile, can use `RUN plugin.sh active.txt` to setup /usr/share/jenkins/ref/plugins from a support bundle
+COPY plugins.sh /usr/local/bin/plugins.sh
diff --git a/1.555/init.groovy b/1.555/init.groovy
new file mode 100644
index 0000000..83c3a3d
--- /dev/null
+++ b/1.555/init.groovy
@@ -0,0 +1,9 @@
+import hudson.model.*;
+import jenkins.model.*;
+
+
+Thread.start {
+ sleep 10000
+ println "--> setting agent port for jnlp"
+ Jenkins.instance.setSlaveAgentPort(50000)
+}
diff --git a/1.555/jenkins.sh b/1.555/jenkins.sh
new file mode 100755
index 0000000..1bd0f85
--- /dev/null
+++ b/1.555/jenkins.sh
@@ -0,0 +1,30 @@
+#! /bin/bash
+
+# Copy files from /usr/share/jenkins/ref into /var/jenkins_home
+# So the initial JENKINS-HOME is set with expected content.
+# Don't override, as this is just a reference setup, and use from UI
+# can then change this, upgrade plugins, etc.
+copy_reference_file() {
+ f=${1%/}
+ echo "$f"
+ rel=${f:23}
+ dir=$(dirname ${f})
+ echo " $f -> $rel"
+ if [[ ! -e /var/jenkins_home/${rel} ]]
+ then
+ echo "copy $rel to JENKINS_HOME"
+ mkdir -p /var/jenkins_home/${dir:23}
+ cp -r /usr/share/jenkins/ref/${rel} /var/jenkins_home/${rel};
+ fi;
+}
+export -f copy_reference_file
+find /usr/share/jenkins/ref/ -type f -exec bash -c 'copy_reference_file {}' \;
+
+# if `docker run` first argument start with `--` the user is passing jenkins launcher arguments
+if [[ $# -lt 1 ]] || [[ "$1" == "--"* ]]; then
+ exec java $JAVA_OPTS -jar /usr/share/jenkins/jenkins.war $JENKINS_OPTS "$@"
+fi
+
+# As argument is not jenkins, assume user want to run his own process, for sample a `bash` shell to explore this image
+exec "$@"
+
diff --git a/1.555/plugins.sh b/1.555/plugins.sh
new file mode 100755
index 0000000..e0df32b
--- /dev/null
+++ b/1.555/plugins.sh
@@ -0,0 +1,17 @@
+#! /bin/bash
+
+# Parse a support-core plugin -style txt file as specification for jenkins plugins to be installed
+# in the reference directory, so user can define a derived Docker image with just :
+#
+# FROM jenkins
+# COPY plugins.txt /plugins.txt
+# RUN /usr/share/jenkins/plugins.sh /plugins.txt
+#
+
+REF=/usr/share/jenkins/ref/plugins
+mkdir -p $REF
+
+while read spec; do
+ plugin=(${spec//:/ });
+ curl -L ${JENKINS_UC}/download/plugins/${plugin[0]}/${plugin[1]}/${plugin[0]}.hpi -o $REF/${plugin[0]}.hpi;
+done < $1
diff --git a/1.556/Dockerfile b/1.556/Dockerfile
new file mode 100644
index 0000000..eb6e502
--- /dev/null
+++ b/1.556/Dockerfile
@@ -0,0 +1,45 @@
+FROM java:openjdk-7u65-jdk
+
+RUN apt-get update && apt-get install -y wget git curl zip && rm -rf /var/lib/apt/lists/*
+
+ENV JENKINS_HOME /var/jenkins_home
+
+# Jenkins is ran with user `jenkins`, uid = 1000
+# If you bind mount a volume from host/vloume from a data container,
+# ensure you use same uid
+RUN useradd -d "$JENKINS_HOME" -u 1000 -m -s /bin/bash jenkins
+
+# Jenkins home directoy is a volume, so configuration and build history
+# can be persisted and survive image upgrades
+VOLUME /var/jenkins_home
+
+# `/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
+
+
+COPY init.groovy /usr/share/jenkins/ref/init.groovy.d/tcp-slave-angent-port.groovy
+
+ENV JENKINS_VERSION 1.556
+
+# could use ADD but this one does not check Last-Modified header
+# see https://github.com/docker/docker/issues/8331
+RUN curl -L http://mirrors.jenkins-ci.org/war-stable/$JENKINS_VERSION/jenkins.war -o /usr/share/jenkins/jenkins.war
+
+ENV JENKINS_UC https://updates.jenkins-ci.org
+RUN chown -R jenkins "$JENKINS_HOME" /usr/share/jenkins/ref
+
+# for main web interface:
+EXPOSE 8080
+
+# will be used by attached slave agents:
+EXPOSE 50000
+
+USER jenkins
+
+COPY jenkins.sh /usr/local/bin/jenkins.sh
+ENTRYPOINT ["/usr/local/bin/jenkins.sh"]
+
+# from a derived Dockerfile, can use `RUN plugin.sh active.txt` to setup /usr/share/jenkins/ref/plugins from a support bundle
+COPY plugins.sh /usr/local/bin/plugins.sh
diff --git a/1.556/init.groovy b/1.556/init.groovy
new file mode 100644
index 0000000..83c3a3d
--- /dev/null
+++ b/1.556/init.groovy
@@ -0,0 +1,9 @@
+import hudson.model.*;
+import jenkins.model.*;
+
+
+Thread.start {
+ sleep 10000
+ println "--> setting agent port for jnlp"
+ Jenkins.instance.setSlaveAgentPort(50000)
+}
diff --git a/1.556/jenkins.sh b/1.556/jenkins.sh
new file mode 100755
index 0000000..1bd0f85
--- /dev/null
+++ b/1.556/jenkins.sh
@@ -0,0 +1,30 @@
+#! /bin/bash
+
+# Copy files from /usr/share/jenkins/ref into /var/jenkins_home
+# So the initial JENKINS-HOME is set with expected content.
+# Don't override, as this is just a reference setup, and use from UI
+# can then change this, upgrade plugins, etc.
+copy_reference_file() {
+ f=${1%/}
+ echo "$f"
+ rel=${f:23}
+ dir=$(dirname ${f})
+ echo " $f -> $rel"
+ if [[ ! -e /var/jenkins_home/${rel} ]]
+ then
+ echo "copy $rel to JENKINS_HOME"
+ mkdir -p /var/jenkins_home/${dir:23}
+ cp -r /usr/share/jenkins/ref/${rel} /var/jenkins_home/${rel};
+ fi;
+}
+export -f copy_reference_file
+find /usr/share/jenkins/ref/ -type f -exec bash -c 'copy_reference_file {}' \;
+
+# if `docker run` first argument start with `--` the user is passing jenkins launcher arguments
+if [[ $# -lt 1 ]] || [[ "$1" == "--"* ]]; then
+ exec java $JAVA_OPTS -jar /usr/share/jenkins/jenkins.war $JENKINS_OPTS "$@"
+fi
+
+# As argument is not jenkins, assume user want to run his own process, for sample a `bash` shell to explore this image
+exec "$@"
+
diff --git a/1.556/plugins.sh b/1.556/plugins.sh
new file mode 100755
index 0000000..e0df32b
--- /dev/null
+++ b/1.556/plugins.sh
@@ -0,0 +1,17 @@
+#! /bin/bash
+
+# Parse a support-core plugin -style txt file as specification for jenkins plugins to be installed
+# in the reference directory, so user can define a derived Docker image with just :
+#
+# FROM jenkins
+# COPY plugins.txt /plugins.txt
+# RUN /usr/share/jenkins/plugins.sh /plugins.txt
+#
+
+REF=/usr/share/jenkins/ref/plugins
+mkdir -p $REF
+
+while read spec; do
+ plugin=(${spec//:/ });
+ curl -L ${JENKINS_UC}/download/plugins/${plugin[0]}/${plugin[1]}/${plugin[0]}.hpi -o $REF/${plugin[0]}.hpi;
+done < $1
diff --git a/1.557/Dockerfile b/1.557/Dockerfile
new file mode 100644
index 0000000..1000372
--- /dev/null
+++ b/1.557/Dockerfile
@@ -0,0 +1,45 @@
+FROM java:openjdk-7u65-jdk
+
+RUN apt-get update && apt-get install -y wget git curl zip && rm -rf /var/lib/apt/lists/*
+
+ENV JENKINS_HOME /var/jenkins_home
+
+# Jenkins is ran with user `jenkins`, uid = 1000
+# If you bind mount a volume from host/vloume from a data container,
+# ensure you use same uid
+RUN useradd -d "$JENKINS_HOME" -u 1000 -m -s /bin/bash jenkins
+
+# Jenkins home directoy is a volume, so configuration and build history
+# can be persisted and survive image upgrades
+VOLUME /var/jenkins_home
+
+# `/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
+
+
+COPY init.groovy /usr/share/jenkins/ref/init.groovy.d/tcp-slave-angent-port.groovy
+
+ENV JENKINS_VERSION 1.557
+
+# could use ADD but this one does not check Last-Modified header
+# see https://github.com/docker/docker/issues/8331
+RUN curl -L http://mirrors.jenkins-ci.org/war-stable/$JENKINS_VERSION/jenkins.war -o /usr/share/jenkins/jenkins.war
+
+ENV JENKINS_UC https://updates.jenkins-ci.org
+RUN chown -R jenkins "$JENKINS_HOME" /usr/share/jenkins/ref
+
+# for main web interface:
+EXPOSE 8080
+
+# will be used by attached slave agents:
+EXPOSE 50000
+
+USER jenkins
+
+COPY jenkins.sh /usr/local/bin/jenkins.sh
+ENTRYPOINT ["/usr/local/bin/jenkins.sh"]
+
+# from a derived Dockerfile, can use `RUN plugin.sh active.txt` to setup /usr/share/jenkins/ref/plugins from a support bundle
+COPY plugins.sh /usr/local/bin/plugins.sh
diff --git a/1.557/init.groovy b/1.557/init.groovy
new file mode 100644
index 0000000..83c3a3d
--- /dev/null
+++ b/1.557/init.groovy
@@ -0,0 +1,9 @@
+import hudson.model.*;
+import jenkins.model.*;
+
+
+Thread.start {
+ sleep 10000
+ println "--> setting agent port for jnlp"
+ Jenkins.instance.setSlaveAgentPort(50000)
+}
diff --git a/1.557/jenkins.sh b/1.557/jenkins.sh
new file mode 100755
index 0000000..1bd0f85
--- /dev/null
+++ b/1.557/jenkins.sh
@@ -0,0 +1,30 @@
+#! /bin/bash
+
+# Copy files from /usr/share/jenkins/ref into /var/jenkins_home
+# So the initial JENKINS-HOME is set with expected content.
+# Don't override, as this is just a reference setup, and use from UI
+# can then change this, upgrade plugins, etc.
+copy_reference_file() {
+ f=${1%/}
+ echo "$f"
+ rel=${f:23}
+ dir=$(dirname ${f})
+ echo " $f -> $rel"
+ if [[ ! -e /var/jenkins_home/${rel} ]]
+ then
+ echo "copy $rel to JENKINS_HOME"
+ mkdir -p /var/jenkins_home/${dir:23}
+ cp -r /usr/share/jenkins/ref/${rel} /var/jenkins_home/${rel};
+ fi;
+}
+export -f copy_reference_file
+find /usr/share/jenkins/ref/ -type f -exec bash -c 'copy_reference_file {}' \;
+
+# if `docker run` first argument start with `--` the user is passing jenkins launcher arguments
+if [[ $# -lt 1 ]] || [[ "$1" == "--"* ]]; then
+ exec java $JAVA_OPTS -jar /usr/share/jenkins/jenkins.war $JENKINS_OPTS "$@"
+fi
+
+# As argument is not jenkins, assume user want to run his own process, for sample a `bash` shell to explore this image
+exec "$@"
+
diff --git a/1.557/plugins.sh b/1.557/plugins.sh
new file mode 100755
index 0000000..e0df32b
--- /dev/null
+++ b/1.557/plugins.sh
@@ -0,0 +1,17 @@
+#! /bin/bash
+
+# Parse a support-core plugin -style txt file as specification for jenkins plugins to be installed
+# in the reference directory, so user can define a derived Docker image with just :
+#
+# FROM jenkins
+# COPY plugins.txt /plugins.txt
+# RUN /usr/share/jenkins/plugins.sh /plugins.txt
+#
+
+REF=/usr/share/jenkins/ref/plugins
+mkdir -p $REF
+
+while read spec; do
+ plugin=(${spec//:/ });
+ curl -L ${JENKINS_UC}/download/plugins/${plugin[0]}/${plugin[1]}/${plugin[0]}.hpi -o $REF/${plugin[0]}.hpi;
+done < $1
diff --git a/1.558/Dockerfile b/1.558/Dockerfile
new file mode 100644
index 0000000..8ab616e
--- /dev/null
+++ b/1.558/Dockerfile
@@ -0,0 +1,45 @@
+FROM java:openjdk-7u65-jdk
+
+RUN apt-get update && apt-get install -y wget git curl zip && rm -rf /var/lib/apt/lists/*
+
+ENV JENKINS_HOME /var/jenkins_home
+
+# Jenkins is ran with user `jenkins`, uid = 1000
+# If you bind mount a volume from host/vloume from a data container,
+# ensure you use same uid
+RUN useradd -d "$JENKINS_HOME" -u 1000 -m -s /bin/bash jenkins
+
+# Jenkins home directoy is a volume, so configuration and build history
+# can be persisted and survive image upgrades
+VOLUME /var/jenkins_home
+
+# `/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
+
+
+COPY init.groovy /usr/share/jenkins/ref/init.groovy.d/tcp-slave-angent-port.groovy
+
+ENV JENKINS_VERSION 1.558
+
+# could use ADD but this one does not check Last-Modified header
+# see https://github.com/docker/docker/issues/8331
+RUN curl -L http://mirrors.jenkins-ci.org/war-stable/$JENKINS_VERSION/jenkins.war -o /usr/share/jenkins/jenkins.war
+
+ENV JENKINS_UC https://updates.jenkins-ci.org
+RUN chown -R jenkins "$JENKINS_HOME" /usr/share/jenkins/ref
+
+# for main web interface:
+EXPOSE 8080
+
+# will be used by attached slave agents:
+EXPOSE 50000
+
+USER jenkins
+
+COPY jenkins.sh /usr/local/bin/jenkins.sh
+ENTRYPOINT ["/usr/local/bin/jenkins.sh"]
+
+# from a derived Dockerfile, can use `RUN plugin.sh active.txt` to setup /usr/share/jenkins/ref/plugins from a support bundle
+COPY plugins.sh /usr/local/bin/plugins.sh
diff --git a/1.558/init.groovy b/1.558/init.groovy
new file mode 100644
index 0000000..83c3a3d
--- /dev/null
+++ b/1.558/init.groovy
@@ -0,0 +1,9 @@
+import hudson.model.*;
+import jenkins.model.*;
+
+
+Thread.start {
+ sleep 10000
+ println "--> setting agent port for jnlp"
+ Jenkins.instance.setSlaveAgentPort(50000)
+}
diff --git a/1.558/jenkins.sh b/1.558/jenkins.sh
new file mode 100755
index 0000000..1bd0f85
--- /dev/null
+++ b/1.558/jenkins.sh
@@ -0,0 +1,30 @@
+#! /bin/bash
+
+# Copy files from /usr/share/jenkins/ref into /var/jenkins_home
+# So the initial JENKINS-HOME is set with expected content.
+# Don't override, as this is just a reference setup, and use from UI
+# can then change this, upgrade plugins, etc.
+copy_reference_file() {
+ f=${1%/}
+ echo "$f"
+ rel=${f:23}
+ dir=$(dirname ${f})
+ echo " $f -> $rel"
+ if [[ ! -e /var/jenkins_home/${rel} ]]
+ then
+ echo "copy $rel to JENKINS_HOME"
+ mkdir -p /var/jenkins_home/${dir:23}
+ cp -r /usr/share/jenkins/ref/${rel} /var/jenkins_home/${rel};
+ fi;
+}
+export -f copy_reference_file
+find /usr/share/jenkins/ref/ -type f -exec bash -c 'copy_reference_file {}' \;
+
+# if `docker run` first argument start with `--` the user is passing jenkins launcher arguments
+if [[ $# -lt 1 ]] || [[ "$1" == "--"* ]]; then
+ exec java $JAVA_OPTS -jar /usr/share/jenkins/jenkins.war $JENKINS_OPTS "$@"
+fi
+
+# As argument is not jenkins, assume user want to run his own process, for sample a `bash` shell to explore this image
+exec "$@"
+
diff --git a/1.558/plugins.sh b/1.558/plugins.sh
new file mode 100755
index 0000000..e0df32b
--- /dev/null
+++ b/1.558/plugins.sh
@@ -0,0 +1,17 @@
+#! /bin/bash
+
+# Parse a support-core plugin -style txt file as specification for jenkins plugins to be installed
+# in the reference directory, so user can define a derived Docker image with just :
+#
+# FROM jenkins
+# COPY plugins.txt /plugins.txt
+# RUN /usr/share/jenkins/plugins.sh /plugins.txt
+#
+
+REF=/usr/share/jenkins/ref/plugins
+mkdir -p $REF
+
+while read spec; do
+ plugin=(${spec//:/ });
+ curl -L ${JENKINS_UC}/download/plugins/${plugin[0]}/${plugin[1]}/${plugin[0]}.hpi -o $REF/${plugin[0]}.hpi;
+done < $1
diff --git a/1.559/Dockerfile b/1.559/Dockerfile
new file mode 100644
index 0000000..e21b58c
--- /dev/null
+++ b/1.559/Dockerfile
@@ -0,0 +1,45 @@
+FROM java:openjdk-7u65-jdk
+
+RUN apt-get update && apt-get install -y wget git curl zip && rm -rf /var/lib/apt/lists/*
+
+ENV JENKINS_HOME /var/jenkins_home
+
+# Jenkins is ran with user `jenkins`, uid = 1000
+# If you bind mount a volume from host/vloume from a data container,
+# ensure you use same uid
+RUN useradd -d "$JENKINS_HOME" -u 1000 -m -s /bin/bash jenkins
+
+# Jenkins home directoy is a volume, so configuration and build history
+# can be persisted and survive image upgrades
+VOLUME /var/jenkins_home
+
+# `/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
+
+
+COPY init.groovy /usr/share/jenkins/ref/init.groovy.d/tcp-slave-angent-port.groovy
+
+ENV JENKINS_VERSION 1.559
+
+# could use ADD but this one does not check Last-Modified header
+# see https://github.com/docker/docker/issues/8331
+RUN curl -L http://mirrors.jenkins-ci.org/war-stable/$JENKINS_VERSION/jenkins.war -o /usr/share/jenkins/jenkins.war
+
+ENV JENKINS_UC https://updates.jenkins-ci.org
+RUN chown -R jenkins "$JENKINS_HOME" /usr/share/jenkins/ref
+
+# for main web interface:
+EXPOSE 8080
+
+# will be used by attached slave agents:
+EXPOSE 50000
+
+USER jenkins
+
+COPY jenkins.sh /usr/local/bin/jenkins.sh
+ENTRYPOINT ["/usr/local/bin/jenkins.sh"]
+
+# from a derived Dockerfile, can use `RUN plugin.sh active.txt` to setup /usr/share/jenkins/ref/plugins from a support bundle
+COPY plugins.sh /usr/local/bin/plugins.sh
diff --git a/1.559/init.groovy b/1.559/init.groovy
new file mode 100644
index 0000000..83c3a3d
--- /dev/null
+++ b/1.559/init.groovy
@@ -0,0 +1,9 @@
+import hudson.model.*;
+import jenkins.model.*;
+
+
+Thread.start {
+ sleep 10000
+ println "--> setting agent port for jnlp"
+ Jenkins.instance.setSlaveAgentPort(50000)
+}
diff --git a/1.559/jenkins.sh b/1.559/jenkins.sh
new file mode 100755
index 0000000..1bd0f85
--- /dev/null
+++ b/1.559/jenkins.sh
@@ -0,0 +1,30 @@
+#! /bin/bash
+
+# Copy files from /usr/share/jenkins/ref into /var/jenkins_home
+# So the initial JENKINS-HOME is set with expected content.
+# Don't override, as this is just a reference setup, and use from UI
+# can then change this, upgrade plugins, etc.
+copy_reference_file() {
+ f=${1%/}
+ echo "$f"
+ rel=${f:23}
+ dir=$(dirname ${f})
+ echo " $f -> $rel"
+ if [[ ! -e /var/jenkins_home/${rel} ]]
+ then
+ echo "copy $rel to JENKINS_HOME"
+ mkdir -p /var/jenkins_home/${dir:23}
+ cp -r /usr/share/jenkins/ref/${rel} /var/jenkins_home/${rel};
+ fi;
+}
+export -f copy_reference_file
+find /usr/share/jenkins/ref/ -type f -exec bash -c 'copy_reference_file {}' \;
+
+# if `docker run` first argument start with `--` the user is passing jenkins launcher arguments
+if [[ $# -lt 1 ]] || [[ "$1" == "--"* ]]; then
+ exec java $JAVA_OPTS -jar /usr/share/jenkins/jenkins.war $JENKINS_OPTS "$@"
+fi
+
+# As argument is not jenkins, assume user want to run his own process, for sample a `bash` shell to explore this image
+exec "$@"
+
diff --git a/1.559/plugins.sh b/1.559/plugins.sh
new file mode 100755
index 0000000..e0df32b
--- /dev/null
+++ b/1.559/plugins.sh
@@ -0,0 +1,17 @@
+#! /bin/bash
+
+# Parse a support-core plugin -style txt file as specification for jenkins plugins to be installed
+# in the reference directory, so user can define a derived Docker image with just :
+#
+# FROM jenkins
+# COPY plugins.txt /plugins.txt
+# RUN /usr/share/jenkins/plugins.sh /plugins.txt
+#
+
+REF=/usr/share/jenkins/ref/plugins
+mkdir -p $REF
+
+while read spec; do
+ plugin=(${spec//:/ });
+ curl -L ${JENKINS_UC}/download/plugins/${plugin[0]}/${plugin[1]}/${plugin[0]}.hpi -o $REF/${plugin[0]}.hpi;
+done < $1
diff --git a/1.560/Dockerfile b/1.560/Dockerfile
new file mode 100644
index 0000000..f9645d3
--- /dev/null
+++ b/1.560/Dockerfile
@@ -0,0 +1,45 @@
+FROM java:openjdk-7u65-jdk
+
+RUN apt-get update && apt-get install -y wget git curl zip && rm -rf /var/lib/apt/lists/*
+
+ENV JENKINS_HOME /var/jenkins_home
+
+# Jenkins is ran with user `jenkins`, uid = 1000
+# If you bind mount a volume from host/vloume from a data container,
+# ensure you use same uid
+RUN useradd -d "$JENKINS_HOME" -u 1000 -m -s /bin/bash jenkins
+
+# Jenkins home directoy is a volume, so configuration and build history
+# can be persisted and survive image upgrades
+VOLUME /var/jenkins_home
+
+# `/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
+
+
+COPY init.groovy /usr/share/jenkins/ref/init.groovy.d/tcp-slave-angent-port.groovy
+
+ENV JENKINS_VERSION 1.560
+
+# could use ADD but this one does not check Last-Modified header
+# see https://github.com/docker/docker/issues/8331
+RUN curl -L http://mirrors.jenkins-ci.org/war-stable/$JENKINS_VERSION/jenkins.war -o /usr/share/jenkins/jenkins.war
+
+ENV JENKINS_UC https://updates.jenkins-ci.org
+RUN chown -R jenkins "$JENKINS_HOME" /usr/share/jenkins/ref
+
+# for main web interface:
+EXPOSE 8080
+
+# will be used by attached slave agents:
+EXPOSE 50000
+
+USER jenkins
+
+COPY jenkins.sh /usr/local/bin/jenkins.sh
+ENTRYPOINT ["/usr/local/bin/jenkins.sh"]
+
+# from a derived Dockerfile, can use `RUN plugin.sh active.txt` to setup /usr/share/jenkins/ref/plugins from a support bundle
+COPY plugins.sh /usr/local/bin/plugins.sh
diff --git a/1.560/init.groovy b/1.560/init.groovy
new file mode 100644
index 0000000..83c3a3d
--- /dev/null
+++ b/1.560/init.groovy
@@ -0,0 +1,9 @@
+import hudson.model.*;
+import jenkins.model.*;
+
+
+Thread.start {
+ sleep 10000
+ println "--> setting agent port for jnlp"
+ Jenkins.instance.setSlaveAgentPort(50000)
+}
diff --git a/1.560/jenkins.sh b/1.560/jenkins.sh
new file mode 100755
index 0000000..1bd0f85
--- /dev/null
+++ b/1.560/jenkins.sh
@@ -0,0 +1,30 @@
+#! /bin/bash
+
+# Copy files from /usr/share/jenkins/ref into /var/jenkins_home
+# So the initial JENKINS-HOME is set with expected content.
+# Don't override, as this is just a reference setup, and use from UI
+# can then change this, upgrade plugins, etc.
+copy_reference_file() {
+ f=${1%/}
+ echo "$f"
+ rel=${f:23}
+ dir=$(dirname ${f})
+ echo " $f -> $rel"
+ if [[ ! -e /var/jenkins_home/${rel} ]]
+ then
+ echo "copy $rel to JENKINS_HOME"
+ mkdir -p /var/jenkins_home/${dir:23}
+ cp -r /usr/share/jenkins/ref/${rel} /var/jenkins_home/${rel};
+ fi;
+}
+export -f copy_reference_file
+find /usr/share/jenkins/ref/ -type f -exec bash -c 'copy_reference_file {}' \;
+
+# if `docker run` first argument start with `--` the user is passing jenkins launcher arguments
+if [[ $# -lt 1 ]] || [[ "$1" == "--"* ]]; then
+ exec java $JAVA_OPTS -jar /usr/share/jenkins/jenkins.war $JENKINS_OPTS "$@"
+fi
+
+# As argument is not jenkins, assume user want to run his own process, for sample a `bash` shell to explore this image
+exec "$@"
+
diff --git a/1.560/plugins.sh b/1.560/plugins.sh
new file mode 100755
index 0000000..e0df32b
--- /dev/null
+++ b/1.560/plugins.sh
@@ -0,0 +1,17 @@
+#! /bin/bash
+
+# Parse a support-core plugin -style txt file as specification for jenkins plugins to be installed
+# in the reference directory, so user can define a derived Docker image with just :
+#
+# FROM jenkins
+# COPY plugins.txt /plugins.txt
+# RUN /usr/share/jenkins/plugins.sh /plugins.txt
+#
+
+REF=/usr/share/jenkins/ref/plugins
+mkdir -p $REF
+
+while read spec; do
+ plugin=(${spec//:/ });
+ curl -L ${JENKINS_UC}/download/plugins/${plugin[0]}/${plugin[1]}/${plugin[0]}.hpi -o $REF/${plugin[0]}.hpi;
+done < $1
diff --git a/1.561/Dockerfile b/1.561/Dockerfile
new file mode 100644
index 0000000..f7f5bf6
--- /dev/null
+++ b/1.561/Dockerfile
@@ -0,0 +1,45 @@
+FROM java:openjdk-7u65-jdk
+
+RUN apt-get update && apt-get install -y wget git curl zip && rm -rf /var/lib/apt/lists/*
+
+ENV JENKINS_HOME /var/jenkins_home
+
+# Jenkins is ran with user `jenkins`, uid = 1000
+# If you bind mount a volume from host/vloume from a data container,
+# ensure you use same uid
+RUN useradd -d "$JENKINS_HOME" -u 1000 -m -s /bin/bash jenkins
+
+# Jenkins home directoy is a volume, so configuration and build history
+# can be persisted and survive image upgrades
+VOLUME /var/jenkins_home
+
+# `/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
+
+
+COPY init.groovy /usr/share/jenkins/ref/init.groovy.d/tcp-slave-angent-port.groovy
+
+ENV JENKINS_VERSION 1.561
+
+# could use ADD but this one does not check Last-Modified header
+# see https://github.com/docker/docker/issues/8331
+RUN curl -L http://mirrors.jenkins-ci.org/war-stable/$JENKINS_VERSION/jenkins.war -o /usr/share/jenkins/jenkins.war
+
+ENV JENKINS_UC https://updates.jenkins-ci.org
+RUN chown -R jenkins "$JENKINS_HOME" /usr/share/jenkins/ref
+
+# for main web interface:
+EXPOSE 8080
+
+# will be used by attached slave agents:
+EXPOSE 50000
+
+USER jenkins
+
+COPY jenkins.sh /usr/local/bin/jenkins.sh
+ENTRYPOINT ["/usr/local/bin/jenkins.sh"]
+
+# from a derived Dockerfile, can use `RUN plugin.sh active.txt` to setup /usr/share/jenkins/ref/plugins from a support bundle
+COPY plugins.sh /usr/local/bin/plugins.sh
diff --git a/1.561/init.groovy b/1.561/init.groovy
new file mode 100644
index 0000000..83c3a3d
--- /dev/null
+++ b/1.561/init.groovy
@@ -0,0 +1,9 @@
+import hudson.model.*;
+import jenkins.model.*;
+
+
+Thread.start {
+ sleep 10000
+ println "--> setting agent port for jnlp"
+ Jenkins.instance.setSlaveAgentPort(50000)
+}
diff --git a/1.561/jenkins.sh b/1.561/jenkins.sh
new file mode 100755
index 0000000..1bd0f85
--- /dev/null
+++ b/1.561/jenkins.sh
@@ -0,0 +1,30 @@
+#! /bin/bash
+
+# Copy files from /usr/share/jenkins/ref into /var/jenkins_home
+# So the initial JENKINS-HOME is set with expected content.
+# Don't override, as this is just a reference setup, and use from UI
+# can then change this, upgrade plugins, etc.
+copy_reference_file() {
+ f=${1%/}
+ echo "$f"
+ rel=${f:23}
+ dir=$(dirname ${f})
+ echo " $f -> $rel"
+ if [[ ! -e /var/jenkins_home/${rel} ]]
+ then
+ echo "copy $rel to JENKINS_HOME"
+ mkdir -p /var/jenkins_home/${dir:23}
+ cp -r /usr/share/jenkins/ref/${rel} /var/jenkins_home/${rel};
+ fi;
+}
+export -f copy_reference_file
+find /usr/share/jenkins/ref/ -type f -exec bash -c 'copy_reference_file {}' \;
+
+# if `docker run` first argument start with `--` the user is passing jenkins launcher arguments
+if [[ $# -lt 1 ]] || [[ "$1" == "--"* ]]; then
+ exec java $JAVA_OPTS -jar /usr/share/jenkins/jenkins.war $JENKINS_OPTS "$@"
+fi
+
+# As argument is not jenkins, assume user want to run his own process, for sample a `bash` shell to explore this image
+exec "$@"
+
diff --git a/1.561/plugins.sh b/1.561/plugins.sh
new file mode 100755
index 0000000..e0df32b
--- /dev/null
+++ b/1.561/plugins.sh
@@ -0,0 +1,17 @@
+#! /bin/bash
+
+# Parse a support-core plugin -style txt file as specification for jenkins plugins to be installed
+# in the reference directory, so user can define a derived Docker image with just :
+#
+# FROM jenkins
+# COPY plugins.txt /plugins.txt
+# RUN /usr/share/jenkins/plugins.sh /plugins.txt
+#
+
+REF=/usr/share/jenkins/ref/plugins
+mkdir -p $REF
+
+while read spec; do
+ plugin=(${spec//:/ });
+ curl -L ${JENKINS_UC}/download/plugins/${plugin[0]}/${plugin[1]}/${plugin[0]}.hpi -o $REF/${plugin[0]}.hpi;
+done < $1
diff --git a/1.562/Dockerfile b/1.562/Dockerfile
new file mode 100644
index 0000000..f449e83
--- /dev/null
+++ b/1.562/Dockerfile
@@ -0,0 +1,45 @@
+FROM java:openjdk-7u65-jdk
+
+RUN apt-get update && apt-get install -y wget git curl zip && rm -rf /var/lib/apt/lists/*
+
+ENV JENKINS_HOME /var/jenkins_home
+
+# Jenkins is ran with user `jenkins`, uid = 1000
+# If you bind mount a volume from host/vloume from a data container,
+# ensure you use same uid
+RUN useradd -d "$JENKINS_HOME" -u 1000 -m -s /bin/bash jenkins
+
+# Jenkins home directoy is a volume, so configuration and build history
+# can be persisted and survive image upgrades
+VOLUME /var/jenkins_home
+
+# `/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
+
+
+COPY init.groovy /usr/share/jenkins/ref/init.groovy.d/tcp-slave-angent-port.groovy
+
+ENV JENKINS_VERSION 1.562
+
+# could use ADD but this one does not check Last-Modified header
+# see https://github.com/docker/docker/issues/8331
+RUN curl -L http://mirrors.jenkins-ci.org/war-stable/$JENKINS_VERSION/jenkins.war -o /usr/share/jenkins/jenkins.war
+
+ENV JENKINS_UC https://updates.jenkins-ci.org
+RUN chown -R jenkins "$JENKINS_HOME" /usr/share/jenkins/ref
+
+# for main web interface:
+EXPOSE 8080
+
+# will be used by attached slave agents:
+EXPOSE 50000
+
+USER jenkins
+
+COPY jenkins.sh /usr/local/bin/jenkins.sh
+ENTRYPOINT ["/usr/local/bin/jenkins.sh"]
+
+# from a derived Dockerfile, can use `RUN plugin.sh active.txt` to setup /usr/share/jenkins/ref/plugins from a support bundle
+COPY plugins.sh /usr/local/bin/plugins.sh
diff --git a/1.562/init.groovy b/1.562/init.groovy
new file mode 100644
index 0000000..83c3a3d
--- /dev/null
+++ b/1.562/init.groovy
@@ -0,0 +1,9 @@
+import hudson.model.*;
+import jenkins.model.*;
+
+
+Thread.start {
+ sleep 10000
+ println "--> setting agent port for jnlp"
+ Jenkins.instance.setSlaveAgentPort(50000)
+}
diff --git a/1.562/jenkins.sh b/1.562/jenkins.sh
new file mode 100755
index 0000000..1bd0f85
--- /dev/null
+++ b/1.562/jenkins.sh
@@ -0,0 +1,30 @@
+#! /bin/bash
+
+# Copy files from /usr/share/jenkins/ref into /var/jenkins_home
+# So the initial JENKINS-HOME is set with expected content.
+# Don't override, as this is just a reference setup, and use from UI
+# can then change this, upgrade plugins, etc.
+copy_reference_file() {
+ f=${1%/}
+ echo "$f"
+ rel=${f:23}
+ dir=$(dirname ${f})
+ echo " $f -> $rel"
+ if [[ ! -e /var/jenkins_home/${rel} ]]
+ then
+ echo "copy $rel to JENKINS_HOME"
+ mkdir -p /var/jenkins_home/${dir:23}
+ cp -r /usr/share/jenkins/ref/${rel} /var/jenkins_home/${rel};
+ fi;
+}
+export -f copy_reference_file
+find /usr/share/jenkins/ref/ -type f -exec bash -c 'copy_reference_file {}' \;
+
+# if `docker run` first argument start with `--` the user is passing jenkins launcher arguments
+if [[ $# -lt 1 ]] || [[ "$1" == "--"* ]]; then
+ exec java $JAVA_OPTS -jar /usr/share/jenkins/jenkins.war $JENKINS_OPTS "$@"
+fi
+
+# As argument is not jenkins, assume user want to run his own process, for sample a `bash` shell to explore this image
+exec "$@"
+
diff --git a/1.562/plugins.sh b/1.562/plugins.sh
new file mode 100755
index 0000000..e0df32b
--- /dev/null
+++ b/1.562/plugins.sh
@@ -0,0 +1,17 @@
+#! /bin/bash
+
+# Parse a support-core plugin -style txt file as specification for jenkins plugins to be installed
+# in the reference directory, so user can define a derived Docker image with just :
+#
+# FROM jenkins
+# COPY plugins.txt /plugins.txt
+# RUN /usr/share/jenkins/plugins.sh /plugins.txt
+#
+
+REF=/usr/share/jenkins/ref/plugins
+mkdir -p $REF
+
+while read spec; do
+ plugin=(${spec//:/ });
+ curl -L ${JENKINS_UC}/download/plugins/${plugin[0]}/${plugin[1]}/${plugin[0]}.hpi -o $REF/${plugin[0]}.hpi;
+done < $1
diff --git a/1.563/Dockerfile b/1.563/Dockerfile
new file mode 100644
index 0000000..cbe8828
--- /dev/null
+++ b/1.563/Dockerfile
@@ -0,0 +1,45 @@
+FROM java:openjdk-7u65-jdk
+
+RUN apt-get update && apt-get install -y wget git curl zip && rm -rf /var/lib/apt/lists/*
+
+ENV JENKINS_HOME /var/jenkins_home
+
+# Jenkins is ran with user `jenkins`, uid = 1000
+# If you bind mount a volume from host/vloume from a data container,
+# ensure you use same uid
+RUN useradd -d "$JENKINS_HOME" -u 1000 -m -s /bin/bash jenkins
+
+# Jenkins home directoy is a volume, so configuration and build history
+# can be persisted and survive image upgrades
+VOLUME /var/jenkins_home
+
+# `/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
+
+
+COPY init.groovy /usr/share/jenkins/ref/init.groovy.d/tcp-slave-angent-port.groovy
+
+ENV JENKINS_VERSION 1.563
+
+# could use ADD but this one does not check Last-Modified header
+# see https://github.com/docker/docker/issues/8331
+RUN curl -L http://mirrors.jenkins-ci.org/war-stable/$JENKINS_VERSION/jenkins.war -o /usr/share/jenkins/jenkins.war
+
+ENV JENKINS_UC https://updates.jenkins-ci.org
+RUN chown -R jenkins "$JENKINS_HOME" /usr/share/jenkins/ref
+
+# for main web interface:
+EXPOSE 8080
+
+# will be used by attached slave agents:
+EXPOSE 50000
+
+USER jenkins
+
+COPY jenkins.sh /usr/local/bin/jenkins.sh
+ENTRYPOINT ["/usr/local/bin/jenkins.sh"]
+
+# from a derived Dockerfile, can use `RUN plugin.sh active.txt` to setup /usr/share/jenkins/ref/plugins from a support bundle
+COPY plugins.sh /usr/local/bin/plugins.sh
diff --git a/1.563/init.groovy b/1.563/init.groovy
new file mode 100644
index 0000000..83c3a3d
--- /dev/null
+++ b/1.563/init.groovy
@@ -0,0 +1,9 @@
+import hudson.model.*;
+import jenkins.model.*;
+
+
+Thread.start {
+ sleep 10000
+ println "--> setting agent port for jnlp"
+ Jenkins.instance.setSlaveAgentPort(50000)
+}
diff --git a/1.563/jenkins.sh b/1.563/jenkins.sh
new file mode 100755
index 0000000..1bd0f85
--- /dev/null
+++ b/1.563/jenkins.sh
@@ -0,0 +1,30 @@
+#! /bin/bash
+
+# Copy files from /usr/share/jenkins/ref into /var/jenkins_home
+# So the initial JENKINS-HOME is set with expected content.
+# Don't override, as this is just a reference setup, and use from UI
+# can then change this, upgrade plugins, etc.
+copy_reference_file() {
+ f=${1%/}
+ echo "$f"
+ rel=${f:23}
+ dir=$(dirname ${f})
+ echo " $f -> $rel"
+ if [[ ! -e /var/jenkins_home/${rel} ]]
+ then
+ echo "copy $rel to JENKINS_HOME"
+ mkdir -p /var/jenkins_home/${dir:23}
+ cp -r /usr/share/jenkins/ref/${rel} /var/jenkins_home/${rel};
+ fi;
+}
+export -f copy_reference_file
+find /usr/share/jenkins/ref/ -type f -exec bash -c 'copy_reference_file {}' \;
+
+# if `docker run` first argument start with `--` the user is passing jenkins launcher arguments
+if [[ $# -lt 1 ]] || [[ "$1" == "--"* ]]; then
+ exec java $JAVA_OPTS -jar /usr/share/jenkins/jenkins.war $JENKINS_OPTS "$@"
+fi
+
+# As argument is not jenkins, assume user want to run his own process, for sample a `bash` shell to explore this image
+exec "$@"
+
diff --git a/1.563/plugins.sh b/1.563/plugins.sh
new file mode 100755
index 0000000..e0df32b
--- /dev/null
+++ b/1.563/plugins.sh
@@ -0,0 +1,17 @@
+#! /bin/bash
+
+# Parse a support-core plugin -style txt file as specification for jenkins plugins to be installed
+# in the reference directory, so user can define a derived Docker image with just :
+#
+# FROM jenkins
+# COPY plugins.txt /plugins.txt
+# RUN /usr/share/jenkins/plugins.sh /plugins.txt
+#
+
+REF=/usr/share/jenkins/ref/plugins
+mkdir -p $REF
+
+while read spec; do
+ plugin=(${spec//:/ });
+ curl -L ${JENKINS_UC}/download/plugins/${plugin[0]}/${plugin[1]}/${plugin[0]}.hpi -o $REF/${plugin[0]}.hpi;
+done < $1
diff --git a/1.564/Dockerfile b/1.564/Dockerfile
new file mode 100644
index 0000000..d3542bc
--- /dev/null
+++ b/1.564/Dockerfile
@@ -0,0 +1,45 @@
+FROM java:openjdk-7u65-jdk
+
+RUN apt-get update && apt-get install -y wget git curl zip && rm -rf /var/lib/apt/lists/*
+
+ENV JENKINS_HOME /var/jenkins_home
+
+# Jenkins is ran with user `jenkins`, uid = 1000
+# If you bind mount a volume from host/vloume from a data container,
+# ensure you use same uid
+RUN useradd -d "$JENKINS_HOME" -u 1000 -m -s /bin/bash jenkins
+
+# Jenkins home directoy is a volume, so configuration and build history
+# can be persisted and survive image upgrades
+VOLUME /var/jenkins_home
+
+# `/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
+
+
+COPY init.groovy /usr/share/jenkins/ref/init.groovy.d/tcp-slave-angent-port.groovy
+
+ENV JENKINS_VERSION 1.564
+
+# could use ADD but this one does not check Last-Modified header
+# see https://github.com/docker/docker/issues/8331
+RUN curl -L http://mirrors.jenkins-ci.org/war-stable/$JENKINS_VERSION/jenkins.war -o /usr/share/jenkins/jenkins.war
+
+ENV JENKINS_UC https://updates.jenkins-ci.org
+RUN chown -R jenkins "$JENKINS_HOME" /usr/share/jenkins/ref
+
+# for main web interface:
+EXPOSE 8080
+
+# will be used by attached slave agents:
+EXPOSE 50000
+
+USER jenkins
+
+COPY jenkins.sh /usr/local/bin/jenkins.sh
+ENTRYPOINT ["/usr/local/bin/jenkins.sh"]
+
+# from a derived Dockerfile, can use `RUN plugin.sh active.txt` to setup /usr/share/jenkins/ref/plugins from a support bundle
+COPY plugins.sh /usr/local/bin/plugins.sh
diff --git a/1.564/init.groovy b/1.564/init.groovy
new file mode 100644
index 0000000..83c3a3d
--- /dev/null
+++ b/1.564/init.groovy
@@ -0,0 +1,9 @@
+import hudson.model.*;
+import jenkins.model.*;
+
+
+Thread.start {
+ sleep 10000
+ println "--> setting agent port for jnlp"
+ Jenkins.instance.setSlaveAgentPort(50000)
+}
diff --git a/1.564/jenkins.sh b/1.564/jenkins.sh
new file mode 100755
index 0000000..1bd0f85
--- /dev/null
+++ b/1.564/jenkins.sh
@@ -0,0 +1,30 @@
+#! /bin/bash
+
+# Copy files from /usr/share/jenkins/ref into /var/jenkins_home
+# So the initial JENKINS-HOME is set with expected content.
+# Don't override, as this is just a reference setup, and use from UI
+# can then change this, upgrade plugins, etc.
+copy_reference_file() {
+ f=${1%/}
+ echo "$f"
+ rel=${f:23}
+ dir=$(dirname ${f})
+ echo " $f -> $rel"
+ if [[ ! -e /var/jenkins_home/${rel} ]]
+ then
+ echo "copy $rel to JENKINS_HOME"
+ mkdir -p /var/jenkins_home/${dir:23}
+ cp -r /usr/share/jenkins/ref/${rel} /var/jenkins_home/${rel};
+ fi;
+}
+export -f copy_reference_file
+find /usr/share/jenkins/ref/ -type f -exec bash -c 'copy_reference_file {}' \;
+
+# if `docker run` first argument start with `--` the user is passing jenkins launcher arguments
+if [[ $# -lt 1 ]] || [[ "$1" == "--"* ]]; then
+ exec java $JAVA_OPTS -jar /usr/share/jenkins/jenkins.war $JENKINS_OPTS "$@"
+fi
+
+# As argument is not jenkins, assume user want to run his own process, for sample a `bash` shell to explore this image
+exec "$@"
+
diff --git a/1.564/plugins.sh b/1.564/plugins.sh
new file mode 100755
index 0000000..e0df32b
--- /dev/null
+++ b/1.564/plugins.sh
@@ -0,0 +1,17 @@
+#! /bin/bash
+
+# Parse a support-core plugin -style txt file as specification for jenkins plugins to be installed
+# in the reference directory, so user can define a derived Docker image with just :
+#
+# FROM jenkins
+# COPY plugins.txt /plugins.txt
+# RUN /usr/share/jenkins/plugins.sh /plugins.txt
+#
+
+REF=/usr/share/jenkins/ref/plugins
+mkdir -p $REF
+
+while read spec; do
+ plugin=(${spec//:/ });
+ curl -L ${JENKINS_UC}/download/plugins/${plugin[0]}/${plugin[1]}/${plugin[0]}.hpi -o $REF/${plugin[0]}.hpi;
+done < $1
diff --git a/1.565.3/Dockerfile b/1.565.3/Dockerfile
new file mode 100644
index 0000000..2330f73
--- /dev/null
+++ b/1.565.3/Dockerfile
@@ -0,0 +1,45 @@
+FROM java:openjdk-7u65-jdk
+
+RUN apt-get update && apt-get install -y wget git curl zip && rm -rf /var/lib/apt/lists/*
+
+ENV JENKINS_HOME /var/jenkins_home
+
+# Jenkins is ran with user `jenkins`, uid = 1000
+# If you bind mount a volume from host/vloume from a data container,
+# ensure you use same uid
+RUN useradd -d "$JENKINS_HOME" -u 1000 -m -s /bin/bash jenkins
+
+# Jenkins home directoy is a volume, so configuration and build history
+# can be persisted and survive image upgrades
+VOLUME /var/jenkins_home
+
+# `/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
+
+
+COPY init.groovy /usr/share/jenkins/ref/init.groovy.d/tcp-slave-angent-port.groovy
+
+ENV JENKINS_VERSION 1.565.3
+
+# could use ADD but this one does not check Last-Modified header
+# see https://github.com/docker/docker/issues/8331
+RUN curl -L http://mirrors.jenkins-ci.org/war-stable/$JENKINS_VERSION/jenkins.war -o /usr/share/jenkins/jenkins.war
+
+ENV JENKINS_UC https://updates.jenkins-ci.org
+RUN chown -R jenkins "$JENKINS_HOME" /usr/share/jenkins/ref
+
+# for main web interface:
+EXPOSE 8080
+
+# will be used by attached slave agents:
+EXPOSE 50000
+
+USER jenkins
+
+COPY jenkins.sh /usr/local/bin/jenkins.sh
+ENTRYPOINT ["/usr/local/bin/jenkins.sh"]
+
+# from a derived Dockerfile, can use `RUN plugin.sh active.txt` to setup /usr/share/jenkins/ref/plugins from a support bundle
+COPY plugins.sh /usr/local/bin/plugins.sh
diff --git a/1.565.3/init.groovy b/1.565.3/init.groovy
new file mode 100644
index 0000000..83c3a3d
--- /dev/null
+++ b/1.565.3/init.groovy
@@ -0,0 +1,9 @@
+import hudson.model.*;
+import jenkins.model.*;
+
+
+Thread.start {
+ sleep 10000
+ println "--> setting agent port for jnlp"
+ Jenkins.instance.setSlaveAgentPort(50000)
+}
diff --git a/1.565.3/jenkins.sh b/1.565.3/jenkins.sh
new file mode 100755
index 0000000..1bd0f85
--- /dev/null
+++ b/1.565.3/jenkins.sh
@@ -0,0 +1,30 @@
+#! /bin/bash
+
+# Copy files from /usr/share/jenkins/ref into /var/jenkins_home
+# So the initial JENKINS-HOME is set with expected content.
+# Don't override, as this is just a reference setup, and use from UI
+# can then change this, upgrade plugins, etc.
+copy_reference_file() {
+ f=${1%/}
+ echo "$f"
+ rel=${f:23}
+ dir=$(dirname ${f})
+ echo " $f -> $rel"
+ if [[ ! -e /var/jenkins_home/${rel} ]]
+ then
+ echo "copy $rel to JENKINS_HOME"
+ mkdir -p /var/jenkins_home/${dir:23}
+ cp -r /usr/share/jenkins/ref/${rel} /var/jenkins_home/${rel};
+ fi;
+}
+export -f copy_reference_file
+find /usr/share/jenkins/ref/ -type f -exec bash -c 'copy_reference_file {}' \;
+
+# if `docker run` first argument start with `--` the user is passing jenkins launcher arguments
+if [[ $# -lt 1 ]] || [[ "$1" == "--"* ]]; then
+ exec java $JAVA_OPTS -jar /usr/share/jenkins/jenkins.war $JENKINS_OPTS "$@"
+fi
+
+# As argument is not jenkins, assume user want to run his own process, for sample a `bash` shell to explore this image
+exec "$@"
+
diff --git a/1.565.3/plugins.sh b/1.565.3/plugins.sh
new file mode 100755
index 0000000..e0df32b
--- /dev/null
+++ b/1.565.3/plugins.sh
@@ -0,0 +1,17 @@
+#! /bin/bash
+
+# Parse a support-core plugin -style txt file as specification for jenkins plugins to be installed
+# in the reference directory, so user can define a derived Docker image with just :
+#
+# FROM jenkins
+# COPY plugins.txt /plugins.txt
+# RUN /usr/share/jenkins/plugins.sh /plugins.txt
+#
+
+REF=/usr/share/jenkins/ref/plugins
+mkdir -p $REF
+
+while read spec; do
+ plugin=(${spec//:/ });
+ curl -L ${JENKINS_UC}/download/plugins/${plugin[0]}/${plugin[1]}/${plugin[0]}.hpi -o $REF/${plugin[0]}.hpi;
+done < $1
diff --git a/1.565/Dockerfile b/1.565/Dockerfile
new file mode 100644
index 0000000..5a3c59d
--- /dev/null
+++ b/1.565/Dockerfile
@@ -0,0 +1,45 @@
+FROM java:openjdk-7u65-jdk
+
+RUN apt-get update && apt-get install -y wget git curl zip && rm -rf /var/lib/apt/lists/*
+
+ENV JENKINS_HOME /var/jenkins_home
+
+# Jenkins is ran with user `jenkins`, uid = 1000
+# If you bind mount a volume from host/vloume from a data container,
+# ensure you use same uid
+RUN useradd -d "$JENKINS_HOME" -u 1000 -m -s /bin/bash jenkins
+
+# Jenkins home directoy is a volume, so configuration and build history
+# can be persisted and survive image upgrades
+VOLUME /var/jenkins_home
+
+# `/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
+
+
+COPY init.groovy /usr/share/jenkins/ref/init.groovy.d/tcp-slave-angent-port.groovy
+
+ENV JENKINS_VERSION 1.565
+
+# could use ADD but this one does not check Last-Modified header
+# see https://github.com/docker/docker/issues/8331
+RUN curl -L http://mirrors.jenkins-ci.org/war-stable/$JENKINS_VERSION/jenkins.war -o /usr/share/jenkins/jenkins.war
+
+ENV JENKINS_UC https://updates.jenkins-ci.org
+RUN chown -R jenkins "$JENKINS_HOME" /usr/share/jenkins/ref
+
+# for main web interface:
+EXPOSE 8080
+
+# will be used by attached slave agents:
+EXPOSE 50000
+
+USER jenkins
+
+COPY jenkins.sh /usr/local/bin/jenkins.sh
+ENTRYPOINT ["/usr/local/bin/jenkins.sh"]
+
+# from a derived Dockerfile, can use `RUN plugin.sh active.txt` to setup /usr/share/jenkins/ref/plugins from a support bundle
+COPY plugins.sh /usr/local/bin/plugins.sh
diff --git a/1.565/init.groovy b/1.565/init.groovy
new file mode 100644
index 0000000..83c3a3d
--- /dev/null
+++ b/1.565/init.groovy
@@ -0,0 +1,9 @@
+import hudson.model.*;
+import jenkins.model.*;
+
+
+Thread.start {
+ sleep 10000
+ println "--> setting agent port for jnlp"
+ Jenkins.instance.setSlaveAgentPort(50000)
+}
diff --git a/1.565/jenkins.sh b/1.565/jenkins.sh
new file mode 100755
index 0000000..1bd0f85
--- /dev/null
+++ b/1.565/jenkins.sh
@@ -0,0 +1,30 @@
+#! /bin/bash
+
+# Copy files from /usr/share/jenkins/ref into /var/jenkins_home
+# So the initial JENKINS-HOME is set with expected content.
+# Don't override, as this is just a reference setup, and use from UI
+# can then change this, upgrade plugins, etc.
+copy_reference_file() {
+ f=${1%/}
+ echo "$f"
+ rel=${f:23}
+ dir=$(dirname ${f})
+ echo " $f -> $rel"
+ if [[ ! -e /var/jenkins_home/${rel} ]]
+ then
+ echo "copy $rel to JENKINS_HOME"
+ mkdir -p /var/jenkins_home/${dir:23}
+ cp -r /usr/share/jenkins/ref/${rel} /var/jenkins_home/${rel};
+ fi;
+}
+export -f copy_reference_file
+find /usr/share/jenkins/ref/ -type f -exec bash -c 'copy_reference_file {}' \;
+
+# if `docker run` first argument start with `--` the user is passing jenkins launcher arguments
+if [[ $# -lt 1 ]] || [[ "$1" == "--"* ]]; then
+ exec java $JAVA_OPTS -jar /usr/share/jenkins/jenkins.war $JENKINS_OPTS "$@"
+fi
+
+# As argument is not jenkins, assume user want to run his own process, for sample a `bash` shell to explore this image
+exec "$@"
+
diff --git a/1.565/plugins.sh b/1.565/plugins.sh
new file mode 100755
index 0000000..e0df32b
--- /dev/null
+++ b/1.565/plugins.sh
@@ -0,0 +1,17 @@
+#! /bin/bash
+
+# Parse a support-core plugin -style txt file as specification for jenkins plugins to be installed
+# in the reference directory, so user can define a derived Docker image with just :
+#
+# FROM jenkins
+# COPY plugins.txt /plugins.txt
+# RUN /usr/share/jenkins/plugins.sh /plugins.txt
+#
+
+REF=/usr/share/jenkins/ref/plugins
+mkdir -p $REF
+
+while read spec; do
+ plugin=(${spec//:/ });
+ curl -L ${JENKINS_UC}/download/plugins/${plugin[0]}/${plugin[1]}/${plugin[0]}.hpi -o $REF/${plugin[0]}.hpi;
+done < $1
diff --git a/1.566/Dockerfile b/1.566/Dockerfile
new file mode 100644
index 0000000..ae0db6d
--- /dev/null
+++ b/1.566/Dockerfile
@@ -0,0 +1,45 @@
+FROM java:openjdk-7u65-jdk
+
+RUN apt-get update && apt-get install -y wget git curl zip && rm -rf /var/lib/apt/lists/*
+
+ENV JENKINS_HOME /var/jenkins_home
+
+# Jenkins is ran with user `jenkins`, uid = 1000
+# If you bind mount a volume from host/vloume from a data container,
+# ensure you use same uid
+RUN useradd -d "$JENKINS_HOME" -u 1000 -m -s /bin/bash jenkins
+
+# Jenkins home directoy is a volume, so configuration and build history
+# can be persisted and survive image upgrades
+VOLUME /var/jenkins_home
+
+# `/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
+
+
+COPY init.groovy /usr/share/jenkins/ref/init.groovy.d/tcp-slave-angent-port.groovy
+
+ENV JENKINS_VERSION 1.566
+
+# could use ADD but this one does not check Last-Modified header
+# see https://github.com/docker/docker/issues/8331
+RUN curl -L http://mirrors.jenkins-ci.org/war-stable/$JENKINS_VERSION/jenkins.war -o /usr/share/jenkins/jenkins.war
+
+ENV JENKINS_UC https://updates.jenkins-ci.org
+RUN chown -R jenkins "$JENKINS_HOME" /usr/share/jenkins/ref
+
+# for main web interface:
+EXPOSE 8080
+
+# will be used by attached slave agents:
+EXPOSE 50000
+
+USER jenkins
+
+COPY jenkins.sh /usr/local/bin/jenkins.sh
+ENTRYPOINT ["/usr/local/bin/jenkins.sh"]
+
+# from a derived Dockerfile, can use `RUN plugin.sh active.txt` to setup /usr/share/jenkins/ref/plugins from a support bundle
+COPY plugins.sh /usr/local/bin/plugins.sh
diff --git a/1.566/init.groovy b/1.566/init.groovy
new file mode 100644
index 0000000..83c3a3d
--- /dev/null
+++ b/1.566/init.groovy
@@ -0,0 +1,9 @@
+import hudson.model.*;
+import jenkins.model.*;
+
+
+Thread.start {
+ sleep 10000
+ println "--> setting agent port for jnlp"
+ Jenkins.instance.setSlaveAgentPort(50000)
+}
diff --git a/1.566/jenkins.sh b/1.566/jenkins.sh
new file mode 100755
index 0000000..1bd0f85
--- /dev/null
+++ b/1.566/jenkins.sh
@@ -0,0 +1,30 @@
+#! /bin/bash
+
+# Copy files from /usr/share/jenkins/ref into /var/jenkins_home
+# So the initial JENKINS-HOME is set with expected content.
+# Don't override, as this is just a reference setup, and use from UI
+# can then change this, upgrade plugins, etc.
+copy_reference_file() {
+ f=${1%/}
+ echo "$f"
+ rel=${f:23}
+ dir=$(dirname ${f})
+ echo " $f -> $rel"
+ if [[ ! -e /var/jenkins_home/${rel} ]]
+ then
+ echo "copy $rel to JENKINS_HOME"
+ mkdir -p /var/jenkins_home/${dir:23}
+ cp -r /usr/share/jenkins/ref/${rel} /var/jenkins_home/${rel};
+ fi;
+}
+export -f copy_reference_file
+find /usr/share/jenkins/ref/ -type f -exec bash -c 'copy_reference_file {}' \;
+
+# if `docker run` first argument start with `--` the user is passing jenkins launcher arguments
+if [[ $# -lt 1 ]] || [[ "$1" == "--"* ]]; then
+ exec java $JAVA_OPTS -jar /usr/share/jenkins/jenkins.war $JENKINS_OPTS "$@"
+fi
+
+# As argument is not jenkins, assume user want to run his own process, for sample a `bash` shell to explore this image
+exec "$@"
+
diff --git a/1.566/plugins.sh b/1.566/plugins.sh
new file mode 100755
index 0000000..e0df32b
--- /dev/null
+++ b/1.566/plugins.sh
@@ -0,0 +1,17 @@
+#! /bin/bash
+
+# Parse a support-core plugin -style txt file as specification for jenkins plugins to be installed
+# in the reference directory, so user can define a derived Docker image with just :
+#
+# FROM jenkins
+# COPY plugins.txt /plugins.txt
+# RUN /usr/share/jenkins/plugins.sh /plugins.txt
+#
+
+REF=/usr/share/jenkins/ref/plugins
+mkdir -p $REF
+
+while read spec; do
+ plugin=(${spec//:/ });
+ curl -L ${JENKINS_UC}/download/plugins/${plugin[0]}/${plugin[1]}/${plugin[0]}.hpi -o $REF/${plugin[0]}.hpi;
+done < $1
diff --git a/1.567/Dockerfile b/1.567/Dockerfile
new file mode 100644
index 0000000..c88b51e
--- /dev/null
+++ b/1.567/Dockerfile
@@ -0,0 +1,45 @@
+FROM java:openjdk-7u65-jdk
+
+RUN apt-get update && apt-get install -y wget git curl zip && rm -rf /var/lib/apt/lists/*
+
+ENV JENKINS_HOME /var/jenkins_home
+
+# Jenkins is ran with user `jenkins`, uid = 1000
+# If you bind mount a volume from host/vloume from a data container,
+# ensure you use same uid
+RUN useradd -d "$JENKINS_HOME" -u 1000 -m -s /bin/bash jenkins
+
+# Jenkins home directoy is a volume, so configuration and build history
+# can be persisted and survive image upgrades
+VOLUME /var/jenkins_home
+
+# `/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
+
+
+COPY init.groovy /usr/share/jenkins/ref/init.groovy.d/tcp-slave-angent-port.groovy
+
+ENV JENKINS_VERSION 1.567
+
+# could use ADD but this one does not check Last-Modified header
+# see https://github.com/docker/docker/issues/8331
+RUN curl -L http://mirrors.jenkins-ci.org/war-stable/$JENKINS_VERSION/jenkins.war -o /usr/share/jenkins/jenkins.war
+
+ENV JENKINS_UC https://updates.jenkins-ci.org
+RUN chown -R jenkins "$JENKINS_HOME" /usr/share/jenkins/ref
+
+# for main web interface:
+EXPOSE 8080
+
+# will be used by attached slave agents:
+EXPOSE 50000
+
+USER jenkins
+
+COPY jenkins.sh /usr/local/bin/jenkins.sh
+ENTRYPOINT ["/usr/local/bin/jenkins.sh"]
+
+# from a derived Dockerfile, can use `RUN plugin.sh active.txt` to setup /usr/share/jenkins/ref/plugins from a support bundle
+COPY plugins.sh /usr/local/bin/plugins.sh
diff --git a/1.567/init.groovy b/1.567/init.groovy
new file mode 100644
index 0000000..83c3a3d
--- /dev/null
+++ b/1.567/init.groovy
@@ -0,0 +1,9 @@
+import hudson.model.*;
+import jenkins.model.*;
+
+
+Thread.start {
+ sleep 10000
+ println "--> setting agent port for jnlp"
+ Jenkins.instance.setSlaveAgentPort(50000)
+}
diff --git a/1.567/jenkins.sh b/1.567/jenkins.sh
new file mode 100755
index 0000000..1bd0f85
--- /dev/null
+++ b/1.567/jenkins.sh
@@ -0,0 +1,30 @@
+#! /bin/bash
+
+# Copy files from /usr/share/jenkins/ref into /var/jenkins_home
+# So the initial JENKINS-HOME is set with expected content.
+# Don't override, as this is just a reference setup, and use from UI
+# can then change this, upgrade plugins, etc.
+copy_reference_file() {
+ f=${1%/}
+ echo "$f"
+ rel=${f:23}
+ dir=$(dirname ${f})
+ echo " $f -> $rel"
+ if [[ ! -e /var/jenkins_home/${rel} ]]
+ then
+ echo "copy $rel to JENKINS_HOME"
+ mkdir -p /var/jenkins_home/${dir:23}
+ cp -r /usr/share/jenkins/ref/${rel} /var/jenkins_home/${rel};
+ fi;
+}
+export -f copy_reference_file
+find /usr/share/jenkins/ref/ -type f -exec bash -c 'copy_reference_file {}' \;
+
+# if `docker run` first argument start with `--` the user is passing jenkins launcher arguments
+if [[ $# -lt 1 ]] || [[ "$1" == "--"* ]]; then
+ exec java $JAVA_OPTS -jar /usr/share/jenkins/jenkins.war $JENKINS_OPTS "$@"
+fi
+
+# As argument is not jenkins, assume user want to run his own process, for sample a `bash` shell to explore this image
+exec "$@"
+
diff --git a/1.567/plugins.sh b/1.567/plugins.sh
new file mode 100755
index 0000000..e0df32b
--- /dev/null
+++ b/1.567/plugins.sh
@@ -0,0 +1,17 @@
+#! /bin/bash
+
+# Parse a support-core plugin -style txt file as specification for jenkins plugins to be installed
+# in the reference directory, so user can define a derived Docker image with just :
+#
+# FROM jenkins
+# COPY plugins.txt /plugins.txt
+# RUN /usr/share/jenkins/plugins.sh /plugins.txt
+#
+
+REF=/usr/share/jenkins/ref/plugins
+mkdir -p $REF
+
+while read spec; do
+ plugin=(${spec//:/ });
+ curl -L ${JENKINS_UC}/download/plugins/${plugin[0]}/${plugin[1]}/${plugin[0]}.hpi -o $REF/${plugin[0]}.hpi;
+done < $1
diff --git a/1.568/Dockerfile b/1.568/Dockerfile
new file mode 100644
index 0000000..1e6f900
--- /dev/null
+++ b/1.568/Dockerfile
@@ -0,0 +1,45 @@
+FROM java:openjdk-7u65-jdk
+
+RUN apt-get update && apt-get install -y wget git curl zip && rm -rf /var/lib/apt/lists/*
+
+ENV JENKINS_HOME /var/jenkins_home
+
+# Jenkins is ran with user `jenkins`, uid = 1000
+# If you bind mount a volume from host/vloume from a data container,
+# ensure you use same uid
+RUN useradd -d "$JENKINS_HOME" -u 1000 -m -s /bin/bash jenkins
+
+# Jenkins home directoy is a volume, so configuration and build history
+# can be persisted and survive image upgrades
+VOLUME /var/jenkins_home
+
+# `/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
+
+
+COPY init.groovy /usr/share/jenkins/ref/init.groovy.d/tcp-slave-angent-port.groovy
+
+ENV JENKINS_VERSION 1.568
+
+# could use ADD but this one does not check Last-Modified header
+# see https://github.com/docker/docker/issues/8331
+RUN curl -L http://mirrors.jenkins-ci.org/war-stable/$JENKINS_VERSION/jenkins.war -o /usr/share/jenkins/jenkins.war
+
+ENV JENKINS_UC https://updates.jenkins-ci.org
+RUN chown -R jenkins "$JENKINS_HOME" /usr/share/jenkins/ref
+
+# for main web interface:
+EXPOSE 8080
+
+# will be used by attached slave agents:
+EXPOSE 50000
+
+USER jenkins
+
+COPY jenkins.sh /usr/local/bin/jenkins.sh
+ENTRYPOINT ["/usr/local/bin/jenkins.sh"]
+
+# from a derived Dockerfile, can use `RUN plugin.sh active.txt` to setup /usr/share/jenkins/ref/plugins from a support bundle
+COPY plugins.sh /usr/local/bin/plugins.sh
diff --git a/1.568/init.groovy b/1.568/init.groovy
new file mode 100644
index 0000000..83c3a3d
--- /dev/null
+++ b/1.568/init.groovy
@@ -0,0 +1,9 @@
+import hudson.model.*;
+import jenkins.model.*;
+
+
+Thread.start {
+ sleep 10000
+ println "--> setting agent port for jnlp"
+ Jenkins.instance.setSlaveAgentPort(50000)
+}
diff --git a/1.568/jenkins.sh b/1.568/jenkins.sh
new file mode 100755
index 0000000..1bd0f85
--- /dev/null
+++ b/1.568/jenkins.sh
@@ -0,0 +1,30 @@
+#! /bin/bash
+
+# Copy files from /usr/share/jenkins/ref into /var/jenkins_home
+# So the initial JENKINS-HOME is set with expected content.
+# Don't override, as this is just a reference setup, and use from UI
+# can then change this, upgrade plugins, etc.
+copy_reference_file() {
+ f=${1%/}
+ echo "$f"
+ rel=${f:23}
+ dir=$(dirname ${f})
+ echo " $f -> $rel"
+ if [[ ! -e /var/jenkins_home/${rel} ]]
+ then
+ echo "copy $rel to JENKINS_HOME"
+ mkdir -p /var/jenkins_home/${dir:23}
+ cp -r /usr/share/jenkins/ref/${rel} /var/jenkins_home/${rel};
+ fi;
+}
+export -f copy_reference_file
+find /usr/share/jenkins/ref/ -type f -exec bash -c 'copy_reference_file {}' \;
+
+# if `docker run` first argument start with `--` the user is passing jenkins launcher arguments
+if [[ $# -lt 1 ]] || [[ "$1" == "--"* ]]; then
+ exec java $JAVA_OPTS -jar /usr/share/jenkins/jenkins.war $JENKINS_OPTS "$@"
+fi
+
+# As argument is not jenkins, assume user want to run his own process, for sample a `bash` shell to explore this image
+exec "$@"
+
diff --git a/1.568/plugins.sh b/1.568/plugins.sh
new file mode 100755
index 0000000..e0df32b
--- /dev/null
+++ b/1.568/plugins.sh
@@ -0,0 +1,17 @@
+#! /bin/bash
+
+# Parse a support-core plugin -style txt file as specification for jenkins plugins to be installed
+# in the reference directory, so user can define a derived Docker image with just :
+#
+# FROM jenkins
+# COPY plugins.txt /plugins.txt
+# RUN /usr/share/jenkins/plugins.sh /plugins.txt
+#
+
+REF=/usr/share/jenkins/ref/plugins
+mkdir -p $REF
+
+while read spec; do
+ plugin=(${spec//:/ });
+ curl -L ${JENKINS_UC}/download/plugins/${plugin[0]}/${plugin[1]}/${plugin[0]}.hpi -o $REF/${plugin[0]}.hpi;
+done < $1
diff --git a/1.569/Dockerfile b/1.569/Dockerfile
new file mode 100644
index 0000000..0b22bcc
--- /dev/null
+++ b/1.569/Dockerfile
@@ -0,0 +1,45 @@
+FROM java:openjdk-7u65-jdk
+
+RUN apt-get update && apt-get install -y wget git curl zip && rm -rf /var/lib/apt/lists/*
+
+ENV JENKINS_HOME /var/jenkins_home
+
+# Jenkins is ran with user `jenkins`, uid = 1000
+# If you bind mount a volume from host/vloume from a data container,
+# ensure you use same uid
+RUN useradd -d "$JENKINS_HOME" -u 1000 -m -s /bin/bash jenkins
+
+# Jenkins home directoy is a volume, so configuration and build history
+# can be persisted and survive image upgrades
+VOLUME /var/jenkins_home
+
+# `/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
+
+
+COPY init.groovy /usr/share/jenkins/ref/init.groovy.d/tcp-slave-angent-port.groovy
+
+ENV JENKINS_VERSION 1.569
+
+# could use ADD but this one does not check Last-Modified header
+# see https://github.com/docker/docker/issues/8331
+RUN curl -L http://mirrors.jenkins-ci.org/war-stable/$JENKINS_VERSION/jenkins.war -o /usr/share/jenkins/jenkins.war
+
+ENV JENKINS_UC https://updates.jenkins-ci.org
+RUN chown -R jenkins "$JENKINS_HOME" /usr/share/jenkins/ref
+
+# for main web interface:
+EXPOSE 8080
+
+# will be used by attached slave agents:
+EXPOSE 50000
+
+USER jenkins
+
+COPY jenkins.sh /usr/local/bin/jenkins.sh
+ENTRYPOINT ["/usr/local/bin/jenkins.sh"]
+
+# from a derived Dockerfile, can use `RUN plugin.sh active.txt` to setup /usr/share/jenkins/ref/plugins from a support bundle
+COPY plugins.sh /usr/local/bin/plugins.sh
diff --git a/1.569/init.groovy b/1.569/init.groovy
new file mode 100644
index 0000000..83c3a3d
--- /dev/null
+++ b/1.569/init.groovy
@@ -0,0 +1,9 @@
+import hudson.model.*;
+import jenkins.model.*;
+
+
+Thread.start {
+ sleep 10000
+ println "--> setting agent port for jnlp"
+ Jenkins.instance.setSlaveAgentPort(50000)
+}
diff --git a/1.569/jenkins.sh b/1.569/jenkins.sh
new file mode 100755
index 0000000..1bd0f85
--- /dev/null
+++ b/1.569/jenkins.sh
@@ -0,0 +1,30 @@
+#! /bin/bash
+
+# Copy files from /usr/share/jenkins/ref into /var/jenkins_home
+# So the initial JENKINS-HOME is set with expected content.
+# Don't override, as this is just a reference setup, and use from UI
+# can then change this, upgrade plugins, etc.
+copy_reference_file() {
+ f=${1%/}
+ echo "$f"
+ rel=${f:23}
+ dir=$(dirname ${f})
+ echo " $f -> $rel"
+ if [[ ! -e /var/jenkins_home/${rel} ]]
+ then
+ echo "copy $rel to JENKINS_HOME"
+ mkdir -p /var/jenkins_home/${dir:23}
+ cp -r /usr/share/jenkins/ref/${rel} /var/jenkins_home/${rel};
+ fi;
+}
+export -f copy_reference_file
+find /usr/share/jenkins/ref/ -type f -exec bash -c 'copy_reference_file {}' \;
+
+# if `docker run` first argument start with `--` the user is passing jenkins launcher arguments
+if [[ $# -lt 1 ]] || [[ "$1" == "--"* ]]; then
+ exec java $JAVA_OPTS -jar /usr/share/jenkins/jenkins.war $JENKINS_OPTS "$@"
+fi
+
+# As argument is not jenkins, assume user want to run his own process, for sample a `bash` shell to explore this image
+exec "$@"
+
diff --git a/1.569/plugins.sh b/1.569/plugins.sh
new file mode 100755
index 0000000..e0df32b
--- /dev/null
+++ b/1.569/plugins.sh
@@ -0,0 +1,17 @@
+#! /bin/bash
+
+# Parse a support-core plugin -style txt file as specification for jenkins plugins to be installed
+# in the reference directory, so user can define a derived Docker image with just :
+#
+# FROM jenkins
+# COPY plugins.txt /plugins.txt
+# RUN /usr/share/jenkins/plugins.sh /plugins.txt
+#
+
+REF=/usr/share/jenkins/ref/plugins
+mkdir -p $REF
+
+while read spec; do
+ plugin=(${spec//:/ });
+ curl -L ${JENKINS_UC}/download/plugins/${plugin[0]}/${plugin[1]}/${plugin[0]}.hpi -o $REF/${plugin[0]}.hpi;
+done < $1
diff --git a/1.570/Dockerfile b/1.570/Dockerfile
new file mode 100644
index 0000000..9200a7f
--- /dev/null
+++ b/1.570/Dockerfile
@@ -0,0 +1,45 @@
+FROM java:openjdk-7u65-jdk
+
+RUN apt-get update && apt-get install -y wget git curl zip && rm -rf /var/lib/apt/lists/*
+
+ENV JENKINS_HOME /var/jenkins_home
+
+# Jenkins is ran with user `jenkins`, uid = 1000
+# If you bind mount a volume from host/vloume from a data container,
+# ensure you use same uid
+RUN useradd -d "$JENKINS_HOME" -u 1000 -m -s /bin/bash jenkins
+
+# Jenkins home directoy is a volume, so configuration and build history
+# can be persisted and survive image upgrades
+VOLUME /var/jenkins_home
+
+# `/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
+
+
+COPY init.groovy /usr/share/jenkins/ref/init.groovy.d/tcp-slave-angent-port.groovy
+
+ENV JENKINS_VERSION 1.570
+
+# could use ADD but this one does not check Last-Modified header
+# see https://github.com/docker/docker/issues/8331
+RUN curl -L http://mirrors.jenkins-ci.org/war-stable/$JENKINS_VERSION/jenkins.war -o /usr/share/jenkins/jenkins.war
+
+ENV JENKINS_UC https://updates.jenkins-ci.org
+RUN chown -R jenkins "$JENKINS_HOME" /usr/share/jenkins/ref
+
+# for main web interface:
+EXPOSE 8080
+
+# will be used by attached slave agents:
+EXPOSE 50000
+
+USER jenkins
+
+COPY jenkins.sh /usr/local/bin/jenkins.sh
+ENTRYPOINT ["/usr/local/bin/jenkins.sh"]
+
+# from a derived Dockerfile, can use `RUN plugin.sh active.txt` to setup /usr/share/jenkins/ref/plugins from a support bundle
+COPY plugins.sh /usr/local/bin/plugins.sh
diff --git a/1.570/init.groovy b/1.570/init.groovy
new file mode 100644
index 0000000..83c3a3d
--- /dev/null
+++ b/1.570/init.groovy
@@ -0,0 +1,9 @@
+import hudson.model.*;
+import jenkins.model.*;
+
+
+Thread.start {
+ sleep 10000
+ println "--> setting agent port for jnlp"
+ Jenkins.instance.setSlaveAgentPort(50000)
+}
diff --git a/1.570/jenkins.sh b/1.570/jenkins.sh
new file mode 100755
index 0000000..1bd0f85
--- /dev/null
+++ b/1.570/jenkins.sh
@@ -0,0 +1,30 @@
+#! /bin/bash
+
+# Copy files from /usr/share/jenkins/ref into /var/jenkins_home
+# So the initial JENKINS-HOME is set with expected content.
+# Don't override, as this is just a reference setup, and use from UI
+# can then change this, upgrade plugins, etc.
+copy_reference_file() {
+ f=${1%/}
+ echo "$f"
+ rel=${f:23}
+ dir=$(dirname ${f})
+ echo " $f -> $rel"
+ if [[ ! -e /var/jenkins_home/${rel} ]]
+ then
+ echo "copy $rel to JENKINS_HOME"
+ mkdir -p /var/jenkins_home/${dir:23}
+ cp -r /usr/share/jenkins/ref/${rel} /var/jenkins_home/${rel};
+ fi;
+}
+export -f copy_reference_file
+find /usr/share/jenkins/ref/ -type f -exec bash -c 'copy_reference_file {}' \;
+
+# if `docker run` first argument start with `--` the user is passing jenkins launcher arguments
+if [[ $# -lt 1 ]] || [[ "$1" == "--"* ]]; then
+ exec java $JAVA_OPTS -jar /usr/share/jenkins/jenkins.war $JENKINS_OPTS "$@"
+fi
+
+# As argument is not jenkins, assume user want to run his own process, for sample a `bash` shell to explore this image
+exec "$@"
+
diff --git a/1.570/plugins.sh b/1.570/plugins.sh
new file mode 100755
index 0000000..e0df32b
--- /dev/null
+++ b/1.570/plugins.sh
@@ -0,0 +1,17 @@
+#! /bin/bash
+
+# Parse a support-core plugin -style txt file as specification for jenkins plugins to be installed
+# in the reference directory, so user can define a derived Docker image with just :
+#
+# FROM jenkins
+# COPY plugins.txt /plugins.txt
+# RUN /usr/share/jenkins/plugins.sh /plugins.txt
+#
+
+REF=/usr/share/jenkins/ref/plugins
+mkdir -p $REF
+
+while read spec; do
+ plugin=(${spec//:/ });
+ curl -L ${JENKINS_UC}/download/plugins/${plugin[0]}/${plugin[1]}/${plugin[0]}.hpi -o $REF/${plugin[0]}.hpi;
+done < $1
diff --git a/1.571/Dockerfile b/1.571/Dockerfile
new file mode 100644
index 0000000..cf9e11b
--- /dev/null
+++ b/1.571/Dockerfile
@@ -0,0 +1,45 @@
+FROM java:openjdk-7u65-jdk
+
+RUN apt-get update && apt-get install -y wget git curl zip && rm -rf /var/lib/apt/lists/*
+
+ENV JENKINS_HOME /var/jenkins_home
+
+# Jenkins is ran with user `jenkins`, uid = 1000
+# If you bind mount a volume from host/vloume from a data container,
+# ensure you use same uid
+RUN useradd -d "$JENKINS_HOME" -u 1000 -m -s /bin/bash jenkins
+
+# Jenkins home directoy is a volume, so configuration and build history
+# can be persisted and survive image upgrades
+VOLUME /var/jenkins_home
+
+# `/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
+
+
+COPY init.groovy /usr/share/jenkins/ref/init.groovy.d/tcp-slave-angent-port.groovy
+
+ENV JENKINS_VERSION 1.571
+
+# could use ADD but this one does not check Last-Modified header
+# see https://github.com/docker/docker/issues/8331
+RUN curl -L http://mirrors.jenkins-ci.org/war-stable/$JENKINS_VERSION/jenkins.war -o /usr/share/jenkins/jenkins.war
+
+ENV JENKINS_UC https://updates.jenkins-ci.org
+RUN chown -R jenkins "$JENKINS_HOME" /usr/share/jenkins/ref
+
+# for main web interface:
+EXPOSE 8080
+
+# will be used by attached slave agents:
+EXPOSE 50000
+
+USER jenkins
+
+COPY jenkins.sh /usr/local/bin/jenkins.sh
+ENTRYPOINT ["/usr/local/bin/jenkins.sh"]
+
+# from a derived Dockerfile, can use `RUN plugin.sh active.txt` to setup /usr/share/jenkins/ref/plugins from a support bundle
+COPY plugins.sh /usr/local/bin/plugins.sh
diff --git a/1.571/init.groovy b/1.571/init.groovy
new file mode 100644
index 0000000..83c3a3d
--- /dev/null
+++ b/1.571/init.groovy
@@ -0,0 +1,9 @@
+import hudson.model.*;
+import jenkins.model.*;
+
+
+Thread.start {
+ sleep 10000
+ println "--> setting agent port for jnlp"
+ Jenkins.instance.setSlaveAgentPort(50000)
+}
diff --git a/1.571/jenkins.sh b/1.571/jenkins.sh
new file mode 100755
index 0000000..1bd0f85
--- /dev/null
+++ b/1.571/jenkins.sh
@@ -0,0 +1,30 @@
+#! /bin/bash
+
+# Copy files from /usr/share/jenkins/ref into /var/jenkins_home
+# So the initial JENKINS-HOME is set with expected content.
+# Don't override, as this is just a reference setup, and use from UI
+# can then change this, upgrade plugins, etc.
+copy_reference_file() {
+ f=${1%/}
+ echo "$f"
+ rel=${f:23}
+ dir=$(dirname ${f})
+ echo " $f -> $rel"
+ if [[ ! -e /var/jenkins_home/${rel} ]]
+ then
+ echo "copy $rel to JENKINS_HOME"
+ mkdir -p /var/jenkins_home/${dir:23}
+ cp -r /usr/share/jenkins/ref/${rel} /var/jenkins_home/${rel};
+ fi;
+}
+export -f copy_reference_file
+find /usr/share/jenkins/ref/ -type f -exec bash -c 'copy_reference_file {}' \;
+
+# if `docker run` first argument start with `--` the user is passing jenkins launcher arguments
+if [[ $# -lt 1 ]] || [[ "$1" == "--"* ]]; then
+ exec java $JAVA_OPTS -jar /usr/share/jenkins/jenkins.war $JENKINS_OPTS "$@"
+fi
+
+# As argument is not jenkins, assume user want to run his own process, for sample a `bash` shell to explore this image
+exec "$@"
+
diff --git a/1.571/plugins.sh b/1.571/plugins.sh
new file mode 100755
index 0000000..e0df32b
--- /dev/null
+++ b/1.571/plugins.sh
@@ -0,0 +1,17 @@
+#! /bin/bash
+
+# Parse a support-core plugin -style txt file as specification for jenkins plugins to be installed
+# in the reference directory, so user can define a derived Docker image with just :
+#
+# FROM jenkins
+# COPY plugins.txt /plugins.txt
+# RUN /usr/share/jenkins/plugins.sh /plugins.txt
+#
+
+REF=/usr/share/jenkins/ref/plugins
+mkdir -p $REF
+
+while read spec; do
+ plugin=(${spec//:/ });
+ curl -L ${JENKINS_UC}/download/plugins/${plugin[0]}/${plugin[1]}/${plugin[0]}.hpi -o $REF/${plugin[0]}.hpi;
+done < $1
diff --git a/1.572/Dockerfile b/1.572/Dockerfile
new file mode 100644
index 0000000..6282301
--- /dev/null
+++ b/1.572/Dockerfile
@@ -0,0 +1,45 @@
+FROM java:openjdk-7u65-jdk
+
+RUN apt-get update && apt-get install -y wget git curl zip && rm -rf /var/lib/apt/lists/*
+
+ENV JENKINS_HOME /var/jenkins_home
+
+# Jenkins is ran with user `jenkins`, uid = 1000
+# If you bind mount a volume from host/vloume from a data container,
+# ensure you use same uid
+RUN useradd -d "$JENKINS_HOME" -u 1000 -m -s /bin/bash jenkins
+
+# Jenkins home directoy is a volume, so configuration and build history
+# can be persisted and survive image upgrades
+VOLUME /var/jenkins_home
+
+# `/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
+
+
+COPY init.groovy /usr/share/jenkins/ref/init.groovy.d/tcp-slave-angent-port.groovy
+
+ENV JENKINS_VERSION 1.572
+
+# could use ADD but this one does not check Last-Modified header
+# see https://github.com/docker/docker/issues/8331
+RUN curl -L http://mirrors.jenkins-ci.org/war-stable/$JENKINS_VERSION/jenkins.war -o /usr/share/jenkins/jenkins.war
+
+ENV JENKINS_UC https://updates.jenkins-ci.org
+RUN chown -R jenkins "$JENKINS_HOME" /usr/share/jenkins/ref
+
+# for main web interface:
+EXPOSE 8080
+
+# will be used by attached slave agents:
+EXPOSE 50000
+
+USER jenkins
+
+COPY jenkins.sh /usr/local/bin/jenkins.sh
+ENTRYPOINT ["/usr/local/bin/jenkins.sh"]
+
+# from a derived Dockerfile, can use `RUN plugin.sh active.txt` to setup /usr/share/jenkins/ref/plugins from a support bundle
+COPY plugins.sh /usr/local/bin/plugins.sh
diff --git a/1.572/init.groovy b/1.572/init.groovy
new file mode 100644
index 0000000..83c3a3d
--- /dev/null
+++ b/1.572/init.groovy
@@ -0,0 +1,9 @@
+import hudson.model.*;
+import jenkins.model.*;
+
+
+Thread.start {
+ sleep 10000
+ println "--> setting agent port for jnlp"
+ Jenkins.instance.setSlaveAgentPort(50000)
+}
diff --git a/1.572/jenkins.sh b/1.572/jenkins.sh
new file mode 100755
index 0000000..1bd0f85
--- /dev/null
+++ b/1.572/jenkins.sh
@@ -0,0 +1,30 @@
+#! /bin/bash
+
+# Copy files from /usr/share/jenkins/ref into /var/jenkins_home
+# So the initial JENKINS-HOME is set with expected content.
+# Don't override, as this is just a reference setup, and use from UI
+# can then change this, upgrade plugins, etc.
+copy_reference_file() {
+ f=${1%/}
+ echo "$f"
+ rel=${f:23}
+ dir=$(dirname ${f})
+ echo " $f -> $rel"
+ if [[ ! -e /var/jenkins_home/${rel} ]]
+ then
+ echo "copy $rel to JENKINS_HOME"
+ mkdir -p /var/jenkins_home/${dir:23}
+ cp -r /usr/share/jenkins/ref/${rel} /var/jenkins_home/${rel};
+ fi;
+}
+export -f copy_reference_file
+find /usr/share/jenkins/ref/ -type f -exec bash -c 'copy_reference_file {}' \;
+
+# if `docker run` first argument start with `--` the user is passing jenkins launcher arguments
+if [[ $# -lt 1 ]] || [[ "$1" == "--"* ]]; then
+ exec java $JAVA_OPTS -jar /usr/share/jenkins/jenkins.war $JENKINS_OPTS "$@"
+fi
+
+# As argument is not jenkins, assume user want to run his own process, for sample a `bash` shell to explore this image
+exec "$@"
+
diff --git a/1.572/plugins.sh b/1.572/plugins.sh
new file mode 100755
index 0000000..e0df32b
--- /dev/null
+++ b/1.572/plugins.sh
@@ -0,0 +1,17 @@
+#! /bin/bash
+
+# Parse a support-core plugin -style txt file as specification for jenkins plugins to be installed
+# in the reference directory, so user can define a derived Docker image with just :
+#
+# FROM jenkins
+# COPY plugins.txt /plugins.txt
+# RUN /usr/share/jenkins/plugins.sh /plugins.txt
+#
+
+REF=/usr/share/jenkins/ref/plugins
+mkdir -p $REF
+
+while read spec; do
+ plugin=(${spec//:/ });
+ curl -L ${JENKINS_UC}/download/plugins/${plugin[0]}/${plugin[1]}/${plugin[0]}.hpi -o $REF/${plugin[0]}.hpi;
+done < $1
diff --git a/1.573/Dockerfile b/1.573/Dockerfile
new file mode 100644
index 0000000..6d2e41f
--- /dev/null
+++ b/1.573/Dockerfile
@@ -0,0 +1,45 @@
+FROM java:openjdk-7u65-jdk
+
+RUN apt-get update && apt-get install -y wget git curl zip && rm -rf /var/lib/apt/lists/*
+
+ENV JENKINS_HOME /var/jenkins_home
+
+# Jenkins is ran with user `jenkins`, uid = 1000
+# If you bind mount a volume from host/vloume from a data container,
+# ensure you use same uid
+RUN useradd -d "$JENKINS_HOME" -u 1000 -m -s /bin/bash jenkins
+
+# Jenkins home directoy is a volume, so configuration and build history
+# can be persisted and survive image upgrades
+VOLUME /var/jenkins_home
+
+# `/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
+
+
+COPY init.groovy /usr/share/jenkins/ref/init.groovy.d/tcp-slave-angent-port.groovy
+
+ENV JENKINS_VERSION 1.573
+
+# could use ADD but this one does not check Last-Modified header
+# see https://github.com/docker/docker/issues/8331
+RUN curl -L http://mirrors.jenkins-ci.org/war-stable/$JENKINS_VERSION/jenkins.war -o /usr/share/jenkins/jenkins.war
+
+ENV JENKINS_UC https://updates.jenkins-ci.org
+RUN chown -R jenkins "$JENKINS_HOME" /usr/share/jenkins/ref
+
+# for main web interface:
+EXPOSE 8080
+
+# will be used by attached slave agents:
+EXPOSE 50000
+
+USER jenkins
+
+COPY jenkins.sh /usr/local/bin/jenkins.sh
+ENTRYPOINT ["/usr/local/bin/jenkins.sh"]
+
+# from a derived Dockerfile, can use `RUN plugin.sh active.txt` to setup /usr/share/jenkins/ref/plugins from a support bundle
+COPY plugins.sh /usr/local/bin/plugins.sh
diff --git a/1.573/init.groovy b/1.573/init.groovy
new file mode 100644
index 0000000..83c3a3d
--- /dev/null
+++ b/1.573/init.groovy
@@ -0,0 +1,9 @@
+import hudson.model.*;
+import jenkins.model.*;
+
+
+Thread.start {
+ sleep 10000
+ println "--> setting agent port for jnlp"
+ Jenkins.instance.setSlaveAgentPort(50000)
+}
diff --git a/1.573/jenkins.sh b/1.573/jenkins.sh
new file mode 100755
index 0000000..1bd0f85
--- /dev/null
+++ b/1.573/jenkins.sh
@@ -0,0 +1,30 @@
+#! /bin/bash
+
+# Copy files from /usr/share/jenkins/ref into /var/jenkins_home
+# So the initial JENKINS-HOME is set with expected content.
+# Don't override, as this is just a reference setup, and use from UI
+# can then change this, upgrade plugins, etc.
+copy_reference_file() {
+ f=${1%/}
+ echo "$f"
+ rel=${f:23}
+ dir=$(dirname ${f})
+ echo " $f -> $rel"
+ if [[ ! -e /var/jenkins_home/${rel} ]]
+ then
+ echo "copy $rel to JENKINS_HOME"
+ mkdir -p /var/jenkins_home/${dir:23}
+ cp -r /usr/share/jenkins/ref/${rel} /var/jenkins_home/${rel};
+ fi;
+}
+export -f copy_reference_file
+find /usr/share/jenkins/ref/ -type f -exec bash -c 'copy_reference_file {}' \;
+
+# if `docker run` first argument start with `--` the user is passing jenkins launcher arguments
+if [[ $# -lt 1 ]] || [[ "$1" == "--"* ]]; then
+ exec java $JAVA_OPTS -jar /usr/share/jenkins/jenkins.war $JENKINS_OPTS "$@"
+fi
+
+# As argument is not jenkins, assume user want to run his own process, for sample a `bash` shell to explore this image
+exec "$@"
+
diff --git a/1.573/plugins.sh b/1.573/plugins.sh
new file mode 100755
index 0000000..e0df32b
--- /dev/null
+++ b/1.573/plugins.sh
@@ -0,0 +1,17 @@
+#! /bin/bash
+
+# Parse a support-core plugin -style txt file as specification for jenkins plugins to be installed
+# in the reference directory, so user can define a derived Docker image with just :
+#
+# FROM jenkins
+# COPY plugins.txt /plugins.txt
+# RUN /usr/share/jenkins/plugins.sh /plugins.txt
+#
+
+REF=/usr/share/jenkins/ref/plugins
+mkdir -p $REF
+
+while read spec; do
+ plugin=(${spec//:/ });
+ curl -L ${JENKINS_UC}/download/plugins/${plugin[0]}/${plugin[1]}/${plugin[0]}.hpi -o $REF/${plugin[0]}.hpi;
+done < $1
diff --git a/1.574/Dockerfile b/1.574/Dockerfile
new file mode 100644
index 0000000..47de30a
--- /dev/null
+++ b/1.574/Dockerfile
@@ -0,0 +1,45 @@
+FROM java:openjdk-7u65-jdk
+
+RUN apt-get update && apt-get install -y wget git curl zip && rm -rf /var/lib/apt/lists/*
+
+ENV JENKINS_HOME /var/jenkins_home
+
+# Jenkins is ran with user `jenkins`, uid = 1000
+# If you bind mount a volume from host/vloume from a data container,
+# ensure you use same uid
+RUN useradd -d "$JENKINS_HOME" -u 1000 -m -s /bin/bash jenkins
+
+# Jenkins home directoy is a volume, so configuration and build history
+# can be persisted and survive image upgrades
+VOLUME /var/jenkins_home
+
+# `/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
+
+
+COPY init.groovy /usr/share/jenkins/ref/init.groovy.d/tcp-slave-angent-port.groovy
+
+ENV JENKINS_VERSION 1.574
+
+# could use ADD but this one does not check Last-Modified header
+# see https://github.com/docker/docker/issues/8331
+RUN curl -L http://mirrors.jenkins-ci.org/war-stable/$JENKINS_VERSION/jenkins.war -o /usr/share/jenkins/jenkins.war
+
+ENV JENKINS_UC https://updates.jenkins-ci.org
+RUN chown -R jenkins "$JENKINS_HOME" /usr/share/jenkins/ref
+
+# for main web interface:
+EXPOSE 8080
+
+# will be used by attached slave agents:
+EXPOSE 50000
+
+USER jenkins
+
+COPY jenkins.sh /usr/local/bin/jenkins.sh
+ENTRYPOINT ["/usr/local/bin/jenkins.sh"]
+
+# from a derived Dockerfile, can use `RUN plugin.sh active.txt` to setup /usr/share/jenkins/ref/plugins from a support bundle
+COPY plugins.sh /usr/local/bin/plugins.sh
diff --git a/1.574/init.groovy b/1.574/init.groovy
new file mode 100644
index 0000000..83c3a3d
--- /dev/null
+++ b/1.574/init.groovy
@@ -0,0 +1,9 @@
+import hudson.model.*;
+import jenkins.model.*;
+
+
+Thread.start {
+ sleep 10000
+ println "--> setting agent port for jnlp"
+ Jenkins.instance.setSlaveAgentPort(50000)
+}
diff --git a/1.574/jenkins.sh b/1.574/jenkins.sh
new file mode 100755
index 0000000..1bd0f85
--- /dev/null
+++ b/1.574/jenkins.sh
@@ -0,0 +1,30 @@
+#! /bin/bash
+
+# Copy files from /usr/share/jenkins/ref into /var/jenkins_home
+# So the initial JENKINS-HOME is set with expected content.
+# Don't override, as this is just a reference setup, and use from UI
+# can then change this, upgrade plugins, etc.
+copy_reference_file() {
+ f=${1%/}
+ echo "$f"
+ rel=${f:23}
+ dir=$(dirname ${f})
+ echo " $f -> $rel"
+ if [[ ! -e /var/jenkins_home/${rel} ]]
+ then
+ echo "copy $rel to JENKINS_HOME"
+ mkdir -p /var/jenkins_home/${dir:23}
+ cp -r /usr/share/jenkins/ref/${rel} /var/jenkins_home/${rel};
+ fi;
+}
+export -f copy_reference_file
+find /usr/share/jenkins/ref/ -type f -exec bash -c 'copy_reference_file {}' \;
+
+# if `docker run` first argument start with `--` the user is passing jenkins launcher arguments
+if [[ $# -lt 1 ]] || [[ "$1" == "--"* ]]; then
+ exec java $JAVA_OPTS -jar /usr/share/jenkins/jenkins.war $JENKINS_OPTS "$@"
+fi
+
+# As argument is not jenkins, assume user want to run his own process, for sample a `bash` shell to explore this image
+exec "$@"
+
diff --git a/1.574/plugins.sh b/1.574/plugins.sh
new file mode 100755
index 0000000..e0df32b
--- /dev/null
+++ b/1.574/plugins.sh
@@ -0,0 +1,17 @@
+#! /bin/bash
+
+# Parse a support-core plugin -style txt file as specification for jenkins plugins to be installed
+# in the reference directory, so user can define a derived Docker image with just :
+#
+# FROM jenkins
+# COPY plugins.txt /plugins.txt
+# RUN /usr/share/jenkins/plugins.sh /plugins.txt
+#
+
+REF=/usr/share/jenkins/ref/plugins
+mkdir -p $REF
+
+while read spec; do
+ plugin=(${spec//:/ });
+ curl -L ${JENKINS_UC}/download/plugins/${plugin[0]}/${plugin[1]}/${plugin[0]}.hpi -o $REF/${plugin[0]}.hpi;
+done < $1
diff --git a/1.575/Dockerfile b/1.575/Dockerfile
new file mode 100644
index 0000000..778bebd
--- /dev/null
+++ b/1.575/Dockerfile
@@ -0,0 +1,45 @@
+FROM java:openjdk-7u65-jdk
+
+RUN apt-get update && apt-get install -y wget git curl zip && rm -rf /var/lib/apt/lists/*
+
+ENV JENKINS_HOME /var/jenkins_home
+
+# Jenkins is ran with user `jenkins`, uid = 1000
+# If you bind mount a volume from host/vloume from a data container,
+# ensure you use same uid
+RUN useradd -d "$JENKINS_HOME" -u 1000 -m -s /bin/bash jenkins
+
+# Jenkins home directoy is a volume, so configuration and build history
+# can be persisted and survive image upgrades
+VOLUME /var/jenkins_home
+
+# `/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
+
+
+COPY init.groovy /usr/share/jenkins/ref/init.groovy.d/tcp-slave-angent-port.groovy
+
+ENV JENKINS_VERSION 1.575
+
+# could use ADD but this one does not check Last-Modified header
+# see https://github.com/docker/docker/issues/8331
+RUN curl -L http://mirrors.jenkins-ci.org/war-stable/$JENKINS_VERSION/jenkins.war -o /usr/share/jenkins/jenkins.war
+
+ENV JENKINS_UC https://updates.jenkins-ci.org
+RUN chown -R jenkins "$JENKINS_HOME" /usr/share/jenkins/ref
+
+# for main web interface:
+EXPOSE 8080
+
+# will be used by attached slave agents:
+EXPOSE 50000
+
+USER jenkins
+
+COPY jenkins.sh /usr/local/bin/jenkins.sh
+ENTRYPOINT ["/usr/local/bin/jenkins.sh"]
+
+# from a derived Dockerfile, can use `RUN plugin.sh active.txt` to setup /usr/share/jenkins/ref/plugins from a support bundle
+COPY plugins.sh /usr/local/bin/plugins.sh
diff --git a/1.575/init.groovy b/1.575/init.groovy
new file mode 100644
index 0000000..83c3a3d
--- /dev/null
+++ b/1.575/init.groovy
@@ -0,0 +1,9 @@
+import hudson.model.*;
+import jenkins.model.*;
+
+
+Thread.start {
+ sleep 10000
+ println "--> setting agent port for jnlp"
+ Jenkins.instance.setSlaveAgentPort(50000)
+}
diff --git a/1.575/jenkins.sh b/1.575/jenkins.sh
new file mode 100755
index 0000000..1bd0f85
--- /dev/null
+++ b/1.575/jenkins.sh
@@ -0,0 +1,30 @@
+#! /bin/bash
+
+# Copy files from /usr/share/jenkins/ref into /var/jenkins_home
+# So the initial JENKINS-HOME is set with expected content.
+# Don't override, as this is just a reference setup, and use from UI
+# can then change this, upgrade plugins, etc.
+copy_reference_file() {
+ f=${1%/}
+ echo "$f"
+ rel=${f:23}
+ dir=$(dirname ${f})
+ echo " $f -> $rel"
+ if [[ ! -e /var/jenkins_home/${rel} ]]
+ then
+ echo "copy $rel to JENKINS_HOME"
+ mkdir -p /var/jenkins_home/${dir:23}
+ cp -r /usr/share/jenkins/ref/${rel} /var/jenkins_home/${rel};
+ fi;
+}
+export -f copy_reference_file
+find /usr/share/jenkins/ref/ -type f -exec bash -c 'copy_reference_file {}' \;
+
+# if `docker run` first argument start with `--` the user is passing jenkins launcher arguments
+if [[ $# -lt 1 ]] || [[ "$1" == "--"* ]]; then
+ exec java $JAVA_OPTS -jar /usr/share/jenkins/jenkins.war $JENKINS_OPTS "$@"
+fi
+
+# As argument is not jenkins, assume user want to run his own process, for sample a `bash` shell to explore this image
+exec "$@"
+
diff --git a/1.575/plugins.sh b/1.575/plugins.sh
new file mode 100755
index 0000000..e0df32b
--- /dev/null
+++ b/1.575/plugins.sh
@@ -0,0 +1,17 @@
+#! /bin/bash
+
+# Parse a support-core plugin -style txt file as specification for jenkins plugins to be installed
+# in the reference directory, so user can define a derived Docker image with just :
+#
+# FROM jenkins
+# COPY plugins.txt /plugins.txt
+# RUN /usr/share/jenkins/plugins.sh /plugins.txt
+#
+
+REF=/usr/share/jenkins/ref/plugins
+mkdir -p $REF
+
+while read spec; do
+ plugin=(${spec//:/ });
+ curl -L ${JENKINS_UC}/download/plugins/${plugin[0]}/${plugin[1]}/${plugin[0]}.hpi -o $REF/${plugin[0]}.hpi;
+done < $1
diff --git a/1.576/Dockerfile b/1.576/Dockerfile
new file mode 100644
index 0000000..5d6f520
--- /dev/null
+++ b/1.576/Dockerfile
@@ -0,0 +1,45 @@
+FROM java:openjdk-7u65-jdk
+
+RUN apt-get update && apt-get install -y wget git curl zip && rm -rf /var/lib/apt/lists/*
+
+ENV JENKINS_HOME /var/jenkins_home
+
+# Jenkins is ran with user `jenkins`, uid = 1000
+# If you bind mount a volume from host/vloume from a data container,
+# ensure you use same uid
+RUN useradd -d "$JENKINS_HOME" -u 1000 -m -s /bin/bash jenkins
+
+# Jenkins home directoy is a volume, so configuration and build history
+# can be persisted and survive image upgrades
+VOLUME /var/jenkins_home
+
+# `/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
+
+
+COPY init.groovy /usr/share/jenkins/ref/init.groovy.d/tcp-slave-angent-port.groovy
+
+ENV JENKINS_VERSION 1.576
+
+# could use ADD but this one does not check Last-Modified header
+# see https://github.com/docker/docker/issues/8331
+RUN curl -L http://mirrors.jenkins-ci.org/war-stable/$JENKINS_VERSION/jenkins.war -o /usr/share/jenkins/jenkins.war
+
+ENV JENKINS_UC https://updates.jenkins-ci.org
+RUN chown -R jenkins "$JENKINS_HOME" /usr/share/jenkins/ref
+
+# for main web interface:
+EXPOSE 8080
+
+# will be used by attached slave agents:
+EXPOSE 50000
+
+USER jenkins
+
+COPY jenkins.sh /usr/local/bin/jenkins.sh
+ENTRYPOINT ["/usr/local/bin/jenkins.sh"]
+
+# from a derived Dockerfile, can use `RUN plugin.sh active.txt` to setup /usr/share/jenkins/ref/plugins from a support bundle
+COPY plugins.sh /usr/local/bin/plugins.sh
diff --git a/1.576/init.groovy b/1.576/init.groovy
new file mode 100644
index 0000000..83c3a3d
--- /dev/null
+++ b/1.576/init.groovy
@@ -0,0 +1,9 @@
+import hudson.model.*;
+import jenkins.model.*;
+
+
+Thread.start {
+ sleep 10000
+ println "--> setting agent port for jnlp"
+ Jenkins.instance.setSlaveAgentPort(50000)
+}
diff --git a/1.576/jenkins.sh b/1.576/jenkins.sh
new file mode 100755
index 0000000..1bd0f85
--- /dev/null
+++ b/1.576/jenkins.sh
@@ -0,0 +1,30 @@
+#! /bin/bash
+
+# Copy files from /usr/share/jenkins/ref into /var/jenkins_home
+# So the initial JENKINS-HOME is set with expected content.
+# Don't override, as this is just a reference setup, and use from UI
+# can then change this, upgrade plugins, etc.
+copy_reference_file() {
+ f=${1%/}
+ echo "$f"
+ rel=${f:23}
+ dir=$(dirname ${f})
+ echo " $f -> $rel"
+ if [[ ! -e /var/jenkins_home/${rel} ]]
+ then
+ echo "copy $rel to JENKINS_HOME"
+ mkdir -p /var/jenkins_home/${dir:23}
+ cp -r /usr/share/jenkins/ref/${rel} /var/jenkins_home/${rel};
+ fi;
+}
+export -f copy_reference_file
+find /usr/share/jenkins/ref/ -type f -exec bash -c 'copy_reference_file {}' \;
+
+# if `docker run` first argument start with `--` the user is passing jenkins launcher arguments
+if [[ $# -lt 1 ]] || [[ "$1" == "--"* ]]; then
+ exec java $JAVA_OPTS -jar /usr/share/jenkins/jenkins.war $JENKINS_OPTS "$@"
+fi
+
+# As argument is not jenkins, assume user want to run his own process, for sample a `bash` shell to explore this image
+exec "$@"
+
diff --git a/1.576/plugins.sh b/1.576/plugins.sh
new file mode 100755
index 0000000..e0df32b
--- /dev/null
+++ b/1.576/plugins.sh
@@ -0,0 +1,17 @@
+#! /bin/bash
+
+# Parse a support-core plugin -style txt file as specification for jenkins plugins to be installed
+# in the reference directory, so user can define a derived Docker image with just :
+#
+# FROM jenkins
+# COPY plugins.txt /plugins.txt
+# RUN /usr/share/jenkins/plugins.sh /plugins.txt
+#
+
+REF=/usr/share/jenkins/ref/plugins
+mkdir -p $REF
+
+while read spec; do
+ plugin=(${spec//:/ });
+ curl -L ${JENKINS_UC}/download/plugins/${plugin[0]}/${plugin[1]}/${plugin[0]}.hpi -o $REF/${plugin[0]}.hpi;
+done < $1
diff --git a/1.577/Dockerfile b/1.577/Dockerfile
new file mode 100644
index 0000000..2c1c138
--- /dev/null
+++ b/1.577/Dockerfile
@@ -0,0 +1,45 @@
+FROM java:openjdk-7u65-jdk
+
+RUN apt-get update && apt-get install -y wget git curl zip && rm -rf /var/lib/apt/lists/*
+
+ENV JENKINS_HOME /var/jenkins_home
+
+# Jenkins is ran with user `jenkins`, uid = 1000
+# If you bind mount a volume from host/vloume from a data container,
+# ensure you use same uid
+RUN useradd -d "$JENKINS_HOME" -u 1000 -m -s /bin/bash jenkins
+
+# Jenkins home directoy is a volume, so configuration and build history
+# can be persisted and survive image upgrades
+VOLUME /var/jenkins_home
+
+# `/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
+
+
+COPY init.groovy /usr/share/jenkins/ref/init.groovy.d/tcp-slave-angent-port.groovy
+
+ENV JENKINS_VERSION 1.577
+
+# could use ADD but this one does not check Last-Modified header
+# see https://github.com/docker/docker/issues/8331
+RUN curl -L http://mirrors.jenkins-ci.org/war-stable/$JENKINS_VERSION/jenkins.war -o /usr/share/jenkins/jenkins.war
+
+ENV JENKINS_UC https://updates.jenkins-ci.org
+RUN chown -R jenkins "$JENKINS_HOME" /usr/share/jenkins/ref
+
+# for main web interface:
+EXPOSE 8080
+
+# will be used by attached slave agents:
+EXPOSE 50000
+
+USER jenkins
+
+COPY jenkins.sh /usr/local/bin/jenkins.sh
+ENTRYPOINT ["/usr/local/bin/jenkins.sh"]
+
+# from a derived Dockerfile, can use `RUN plugin.sh active.txt` to setup /usr/share/jenkins/ref/plugins from a support bundle
+COPY plugins.sh /usr/local/bin/plugins.sh
diff --git a/1.577/init.groovy b/1.577/init.groovy
new file mode 100644
index 0000000..83c3a3d
--- /dev/null
+++ b/1.577/init.groovy
@@ -0,0 +1,9 @@
+import hudson.model.*;
+import jenkins.model.*;
+
+
+Thread.start {
+ sleep 10000
+ println "--> setting agent port for jnlp"
+ Jenkins.instance.setSlaveAgentPort(50000)
+}
diff --git a/1.577/jenkins.sh b/1.577/jenkins.sh
new file mode 100755
index 0000000..1bd0f85
--- /dev/null
+++ b/1.577/jenkins.sh
@@ -0,0 +1,30 @@
+#! /bin/bash
+
+# Copy files from /usr/share/jenkins/ref into /var/jenkins_home
+# So the initial JENKINS-HOME is set with expected content.
+# Don't override, as this is just a reference setup, and use from UI
+# can then change this, upgrade plugins, etc.
+copy_reference_file() {
+ f=${1%/}
+ echo "$f"
+ rel=${f:23}
+ dir=$(dirname ${f})
+ echo " $f -> $rel"
+ if [[ ! -e /var/jenkins_home/${rel} ]]
+ then
+ echo "copy $rel to JENKINS_HOME"
+ mkdir -p /var/jenkins_home/${dir:23}
+ cp -r /usr/share/jenkins/ref/${rel} /var/jenkins_home/${rel};
+ fi;
+}
+export -f copy_reference_file
+find /usr/share/jenkins/ref/ -type f -exec bash -c 'copy_reference_file {}' \;
+
+# if `docker run` first argument start with `--` the user is passing jenkins launcher arguments
+if [[ $# -lt 1 ]] || [[ "$1" == "--"* ]]; then
+ exec java $JAVA_OPTS -jar /usr/share/jenkins/jenkins.war $JENKINS_OPTS "$@"
+fi
+
+# As argument is not jenkins, assume user want to run his own process, for sample a `bash` shell to explore this image
+exec "$@"
+
diff --git a/1.577/plugins.sh b/1.577/plugins.sh
new file mode 100755
index 0000000..e0df32b
--- /dev/null
+++ b/1.577/plugins.sh
@@ -0,0 +1,17 @@
+#! /bin/bash
+
+# Parse a support-core plugin -style txt file as specification for jenkins plugins to be installed
+# in the reference directory, so user can define a derived Docker image with just :
+#
+# FROM jenkins
+# COPY plugins.txt /plugins.txt
+# RUN /usr/share/jenkins/plugins.sh /plugins.txt
+#
+
+REF=/usr/share/jenkins/ref/plugins
+mkdir -p $REF
+
+while read spec; do
+ plugin=(${spec//:/ });
+ curl -L ${JENKINS_UC}/download/plugins/${plugin[0]}/${plugin[1]}/${plugin[0]}.hpi -o $REF/${plugin[0]}.hpi;
+done < $1
diff --git a/1.578/Dockerfile b/1.578/Dockerfile
new file mode 100644
index 0000000..3f3fa01
--- /dev/null
+++ b/1.578/Dockerfile
@@ -0,0 +1,45 @@
+FROM java:openjdk-7u65-jdk
+
+RUN apt-get update && apt-get install -y wget git curl zip && rm -rf /var/lib/apt/lists/*
+
+ENV JENKINS_HOME /var/jenkins_home
+
+# Jenkins is ran with user `jenkins`, uid = 1000
+# If you bind mount a volume from host/vloume from a data container,
+# ensure you use same uid
+RUN useradd -d "$JENKINS_HOME" -u 1000 -m -s /bin/bash jenkins
+
+# Jenkins home directoy is a volume, so configuration and build history
+# can be persisted and survive image upgrades
+VOLUME /var/jenkins_home
+
+# `/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
+
+
+COPY init.groovy /usr/share/jenkins/ref/init.groovy.d/tcp-slave-angent-port.groovy
+
+ENV JENKINS_VERSION 1.578
+
+# could use ADD but this one does not check Last-Modified header
+# see https://github.com/docker/docker/issues/8331
+RUN curl -L http://mirrors.jenkins-ci.org/war-stable/$JENKINS_VERSION/jenkins.war -o /usr/share/jenkins/jenkins.war
+
+ENV JENKINS_UC https://updates.jenkins-ci.org
+RUN chown -R jenkins "$JENKINS_HOME" /usr/share/jenkins/ref
+
+# for main web interface:
+EXPOSE 8080
+
+# will be used by attached slave agents:
+EXPOSE 50000
+
+USER jenkins
+
+COPY jenkins.sh /usr/local/bin/jenkins.sh
+ENTRYPOINT ["/usr/local/bin/jenkins.sh"]
+
+# from a derived Dockerfile, can use `RUN plugin.sh active.txt` to setup /usr/share/jenkins/ref/plugins from a support bundle
+COPY plugins.sh /usr/local/bin/plugins.sh
diff --git a/1.578/init.groovy b/1.578/init.groovy
new file mode 100644
index 0000000..83c3a3d
--- /dev/null
+++ b/1.578/init.groovy
@@ -0,0 +1,9 @@
+import hudson.model.*;
+import jenkins.model.*;
+
+
+Thread.start {
+ sleep 10000
+ println "--> setting agent port for jnlp"
+ Jenkins.instance.setSlaveAgentPort(50000)
+}
diff --git a/1.578/jenkins.sh b/1.578/jenkins.sh
new file mode 100755
index 0000000..1bd0f85
--- /dev/null
+++ b/1.578/jenkins.sh
@@ -0,0 +1,30 @@
+#! /bin/bash
+
+# Copy files from /usr/share/jenkins/ref into /var/jenkins_home
+# So the initial JENKINS-HOME is set with expected content.
+# Don't override, as this is just a reference setup, and use from UI
+# can then change this, upgrade plugins, etc.
+copy_reference_file() {
+ f=${1%/}
+ echo "$f"
+ rel=${f:23}
+ dir=$(dirname ${f})
+ echo " $f -> $rel"
+ if [[ ! -e /var/jenkins_home/${rel} ]]
+ then
+ echo "copy $rel to JENKINS_HOME"
+ mkdir -p /var/jenkins_home/${dir:23}
+ cp -r /usr/share/jenkins/ref/${rel} /var/jenkins_home/${rel};
+ fi;
+}
+export -f copy_reference_file
+find /usr/share/jenkins/ref/ -type f -exec bash -c 'copy_reference_file {}' \;
+
+# if `docker run` first argument start with `--` the user is passing jenkins launcher arguments
+if [[ $# -lt 1 ]] || [[ "$1" == "--"* ]]; then
+ exec java $JAVA_OPTS -jar /usr/share/jenkins/jenkins.war $JENKINS_OPTS "$@"
+fi
+
+# As argument is not jenkins, assume user want to run his own process, for sample a `bash` shell to explore this image
+exec "$@"
+
diff --git a/1.578/plugins.sh b/1.578/plugins.sh
new file mode 100755
index 0000000..e0df32b
--- /dev/null
+++ b/1.578/plugins.sh
@@ -0,0 +1,17 @@
+#! /bin/bash
+
+# Parse a support-core plugin -style txt file as specification for jenkins plugins to be installed
+# in the reference directory, so user can define a derived Docker image with just :
+#
+# FROM jenkins
+# COPY plugins.txt /plugins.txt
+# RUN /usr/share/jenkins/plugins.sh /plugins.txt
+#
+
+REF=/usr/share/jenkins/ref/plugins
+mkdir -p $REF
+
+while read spec; do
+ plugin=(${spec//:/ });
+ curl -L ${JENKINS_UC}/download/plugins/${plugin[0]}/${plugin[1]}/${plugin[0]}.hpi -o $REF/${plugin[0]}.hpi;
+done < $1
diff --git a/1.579/Dockerfile b/1.579/Dockerfile
new file mode 100644
index 0000000..61f3ad9
--- /dev/null
+++ b/1.579/Dockerfile
@@ -0,0 +1,45 @@
+FROM java:openjdk-7u65-jdk
+
+RUN apt-get update && apt-get install -y wget git curl zip && rm -rf /var/lib/apt/lists/*
+
+ENV JENKINS_HOME /var/jenkins_home
+
+# Jenkins is ran with user `jenkins`, uid = 1000
+# If you bind mount a volume from host/vloume from a data container,
+# ensure you use same uid
+RUN useradd -d "$JENKINS_HOME" -u 1000 -m -s /bin/bash jenkins
+
+# Jenkins home directoy is a volume, so configuration and build history
+# can be persisted and survive image upgrades
+VOLUME /var/jenkins_home
+
+# `/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
+
+
+COPY init.groovy /usr/share/jenkins/ref/init.groovy.d/tcp-slave-angent-port.groovy
+
+ENV JENKINS_VERSION 1.579
+
+# could use ADD but this one does not check Last-Modified header
+# see https://github.com/docker/docker/issues/8331
+RUN curl -L http://mirrors.jenkins-ci.org/war-stable/$JENKINS_VERSION/jenkins.war -o /usr/share/jenkins/jenkins.war
+
+ENV JENKINS_UC https://updates.jenkins-ci.org
+RUN chown -R jenkins "$JENKINS_HOME" /usr/share/jenkins/ref
+
+# for main web interface:
+EXPOSE 8080
+
+# will be used by attached slave agents:
+EXPOSE 50000
+
+USER jenkins
+
+COPY jenkins.sh /usr/local/bin/jenkins.sh
+ENTRYPOINT ["/usr/local/bin/jenkins.sh"]
+
+# from a derived Dockerfile, can use `RUN plugin.sh active.txt` to setup /usr/share/jenkins/ref/plugins from a support bundle
+COPY plugins.sh /usr/local/bin/plugins.sh
diff --git a/1.579/init.groovy b/1.579/init.groovy
new file mode 100644
index 0000000..83c3a3d
--- /dev/null
+++ b/1.579/init.groovy
@@ -0,0 +1,9 @@
+import hudson.model.*;
+import jenkins.model.*;
+
+
+Thread.start {
+ sleep 10000
+ println "--> setting agent port for jnlp"
+ Jenkins.instance.setSlaveAgentPort(50000)
+}
diff --git a/1.579/jenkins.sh b/1.579/jenkins.sh
new file mode 100755
index 0000000..1bd0f85
--- /dev/null
+++ b/1.579/jenkins.sh
@@ -0,0 +1,30 @@
+#! /bin/bash
+
+# Copy files from /usr/share/jenkins/ref into /var/jenkins_home
+# So the initial JENKINS-HOME is set with expected content.
+# Don't override, as this is just a reference setup, and use from UI
+# can then change this, upgrade plugins, etc.
+copy_reference_file() {
+ f=${1%/}
+ echo "$f"
+ rel=${f:23}
+ dir=$(dirname ${f})
+ echo " $f -> $rel"
+ if [[ ! -e /var/jenkins_home/${rel} ]]
+ then
+ echo "copy $rel to JENKINS_HOME"
+ mkdir -p /var/jenkins_home/${dir:23}
+ cp -r /usr/share/jenkins/ref/${rel} /var/jenkins_home/${rel};
+ fi;
+}
+export -f copy_reference_file
+find /usr/share/jenkins/ref/ -type f -exec bash -c 'copy_reference_file {}' \;
+
+# if `docker run` first argument start with `--` the user is passing jenkins launcher arguments
+if [[ $# -lt 1 ]] || [[ "$1" == "--"* ]]; then
+ exec java $JAVA_OPTS -jar /usr/share/jenkins/jenkins.war $JENKINS_OPTS "$@"
+fi
+
+# As argument is not jenkins, assume user want to run his own process, for sample a `bash` shell to explore this image
+exec "$@"
+
diff --git a/1.579/plugins.sh b/1.579/plugins.sh
new file mode 100755
index 0000000..e0df32b
--- /dev/null
+++ b/1.579/plugins.sh
@@ -0,0 +1,17 @@
+#! /bin/bash
+
+# Parse a support-core plugin -style txt file as specification for jenkins plugins to be installed
+# in the reference directory, so user can define a derived Docker image with just :
+#
+# FROM jenkins
+# COPY plugins.txt /plugins.txt
+# RUN /usr/share/jenkins/plugins.sh /plugins.txt
+#
+
+REF=/usr/share/jenkins/ref/plugins
+mkdir -p $REF
+
+while read spec; do
+ plugin=(${spec//:/ });
+ curl -L ${JENKINS_UC}/download/plugins/${plugin[0]}/${plugin[1]}/${plugin[0]}.hpi -o $REF/${plugin[0]}.hpi;
+done < $1
diff --git a/1.580.1/Dockerfile b/1.580.1/Dockerfile
new file mode 100644
index 0000000..0d76bd8
--- /dev/null
+++ b/1.580.1/Dockerfile
@@ -0,0 +1,45 @@
+FROM java:openjdk-7u65-jdk
+
+RUN apt-get update && apt-get install -y wget git curl zip && rm -rf /var/lib/apt/lists/*
+
+ENV JENKINS_HOME /var/jenkins_home
+
+# Jenkins is ran with user `jenkins`, uid = 1000
+# If you bind mount a volume from host/vloume from a data container,
+# ensure you use same uid
+RUN useradd -d "$JENKINS_HOME" -u 1000 -m -s /bin/bash jenkins
+
+# Jenkins home directoy is a volume, so configuration and build history
+# can be persisted and survive image upgrades
+VOLUME /var/jenkins_home
+
+# `/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
+
+
+COPY init.groovy /usr/share/jenkins/ref/init.groovy.d/tcp-slave-angent-port.groovy
+
+ENV JENKINS_VERSION 1.580.1
+
+# could use ADD but this one does not check Last-Modified header
+# see https://github.com/docker/docker/issues/8331
+RUN curl -L http://mirrors.jenkins-ci.org/war-stable/$JENKINS_VERSION/jenkins.war -o /usr/share/jenkins/jenkins.war
+
+ENV JENKINS_UC https://updates.jenkins-ci.org
+RUN chown -R jenkins "$JENKINS_HOME" /usr/share/jenkins/ref
+
+# for main web interface:
+EXPOSE 8080
+
+# will be used by attached slave agents:
+EXPOSE 50000
+
+USER jenkins
+
+COPY jenkins.sh /usr/local/bin/jenkins.sh
+ENTRYPOINT ["/usr/local/bin/jenkins.sh"]
+
+# from a derived Dockerfile, can use `RUN plugin.sh active.txt` to setup /usr/share/jenkins/ref/plugins from a support bundle
+COPY plugins.sh /usr/local/bin/plugins.sh
diff --git a/1.580.1/init.groovy b/1.580.1/init.groovy
new file mode 100644
index 0000000..83c3a3d
--- /dev/null
+++ b/1.580.1/init.groovy
@@ -0,0 +1,9 @@
+import hudson.model.*;
+import jenkins.model.*;
+
+
+Thread.start {
+ sleep 10000
+ println "--> setting agent port for jnlp"
+ Jenkins.instance.setSlaveAgentPort(50000)
+}
diff --git a/1.580.1/jenkins.sh b/1.580.1/jenkins.sh
new file mode 100755
index 0000000..1bd0f85
--- /dev/null
+++ b/1.580.1/jenkins.sh
@@ -0,0 +1,30 @@
+#! /bin/bash
+
+# Copy files from /usr/share/jenkins/ref into /var/jenkins_home
+# So the initial JENKINS-HOME is set with expected content.
+# Don't override, as this is just a reference setup, and use from UI
+# can then change this, upgrade plugins, etc.
+copy_reference_file() {
+ f=${1%/}
+ echo "$f"
+ rel=${f:23}
+ dir=$(dirname ${f})
+ echo " $f -> $rel"
+ if [[ ! -e /var/jenkins_home/${rel} ]]
+ then
+ echo "copy $rel to JENKINS_HOME"
+ mkdir -p /var/jenkins_home/${dir:23}
+ cp -r /usr/share/jenkins/ref/${rel} /var/jenkins_home/${rel};
+ fi;
+}
+export -f copy_reference_file
+find /usr/share/jenkins/ref/ -type f -exec bash -c 'copy_reference_file {}' \;
+
+# if `docker run` first argument start with `--` the user is passing jenkins launcher arguments
+if [[ $# -lt 1 ]] || [[ "$1" == "--"* ]]; then
+ exec java $JAVA_OPTS -jar /usr/share/jenkins/jenkins.war $JENKINS_OPTS "$@"
+fi
+
+# As argument is not jenkins, assume user want to run his own process, for sample a `bash` shell to explore this image
+exec "$@"
+
diff --git a/1.580.1/plugins.sh b/1.580.1/plugins.sh
new file mode 100755
index 0000000..e0df32b
--- /dev/null
+++ b/1.580.1/plugins.sh
@@ -0,0 +1,17 @@
+#! /bin/bash
+
+# Parse a support-core plugin -style txt file as specification for jenkins plugins to be installed
+# in the reference directory, so user can define a derived Docker image with just :
+#
+# FROM jenkins
+# COPY plugins.txt /plugins.txt
+# RUN /usr/share/jenkins/plugins.sh /plugins.txt
+#
+
+REF=/usr/share/jenkins/ref/plugins
+mkdir -p $REF
+
+while read spec; do
+ plugin=(${spec//:/ });
+ curl -L ${JENKINS_UC}/download/plugins/${plugin[0]}/${plugin[1]}/${plugin[0]}.hpi -o $REF/${plugin[0]}.hpi;
+done < $1
diff --git a/1.580/Dockerfile b/1.580/Dockerfile
new file mode 100644
index 0000000..dd08ac9
--- /dev/null
+++ b/1.580/Dockerfile
@@ -0,0 +1,45 @@
+FROM java:openjdk-7u65-jdk
+
+RUN apt-get update && apt-get install -y wget git curl zip && rm -rf /var/lib/apt/lists/*
+
+ENV JENKINS_HOME /var/jenkins_home
+
+# Jenkins is ran with user `jenkins`, uid = 1000
+# If you bind mount a volume from host/vloume from a data container,
+# ensure you use same uid
+RUN useradd -d "$JENKINS_HOME" -u 1000 -m -s /bin/bash jenkins
+
+# Jenkins home directoy is a volume, so configuration and build history
+# can be persisted and survive image upgrades
+VOLUME /var/jenkins_home
+
+# `/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
+
+
+COPY init.groovy /usr/share/jenkins/ref/init.groovy.d/tcp-slave-angent-port.groovy
+
+ENV JENKINS_VERSION 1.580
+
+# could use ADD but this one does not check Last-Modified header
+# see https://github.com/docker/docker/issues/8331
+RUN curl -L http://mirrors.jenkins-ci.org/war-stable/$JENKINS_VERSION/jenkins.war -o /usr/share/jenkins/jenkins.war
+
+ENV JENKINS_UC https://updates.jenkins-ci.org
+RUN chown -R jenkins "$JENKINS_HOME" /usr/share/jenkins/ref
+
+# for main web interface:
+EXPOSE 8080
+
+# will be used by attached slave agents:
+EXPOSE 50000
+
+USER jenkins
+
+COPY jenkins.sh /usr/local/bin/jenkins.sh
+ENTRYPOINT ["/usr/local/bin/jenkins.sh"]
+
+# from a derived Dockerfile, can use `RUN plugin.sh active.txt` to setup /usr/share/jenkins/ref/plugins from a support bundle
+COPY plugins.sh /usr/local/bin/plugins.sh
diff --git a/1.580/init.groovy b/1.580/init.groovy
new file mode 100644
index 0000000..83c3a3d
--- /dev/null
+++ b/1.580/init.groovy
@@ -0,0 +1,9 @@
+import hudson.model.*;
+import jenkins.model.*;
+
+
+Thread.start {
+ sleep 10000
+ println "--> setting agent port for jnlp"
+ Jenkins.instance.setSlaveAgentPort(50000)
+}
diff --git a/1.580/jenkins.sh b/1.580/jenkins.sh
new file mode 100755
index 0000000..1bd0f85
--- /dev/null
+++ b/1.580/jenkins.sh
@@ -0,0 +1,30 @@
+#! /bin/bash
+
+# Copy files from /usr/share/jenkins/ref into /var/jenkins_home
+# So the initial JENKINS-HOME is set with expected content.
+# Don't override, as this is just a reference setup, and use from UI
+# can then change this, upgrade plugins, etc.
+copy_reference_file() {
+ f=${1%/}
+ echo "$f"
+ rel=${f:23}
+ dir=$(dirname ${f})
+ echo " $f -> $rel"
+ if [[ ! -e /var/jenkins_home/${rel} ]]
+ then
+ echo "copy $rel to JENKINS_HOME"
+ mkdir -p /var/jenkins_home/${dir:23}
+ cp -r /usr/share/jenkins/ref/${rel} /var/jenkins_home/${rel};
+ fi;
+}
+export -f copy_reference_file
+find /usr/share/jenkins/ref/ -type f -exec bash -c 'copy_reference_file {}' \;
+
+# if `docker run` first argument start with `--` the user is passing jenkins launcher arguments
+if [[ $# -lt 1 ]] || [[ "$1" == "--"* ]]; then
+ exec java $JAVA_OPTS -jar /usr/share/jenkins/jenkins.war $JENKINS_OPTS "$@"
+fi
+
+# As argument is not jenkins, assume user want to run his own process, for sample a `bash` shell to explore this image
+exec "$@"
+
diff --git a/1.580/plugins.sh b/1.580/plugins.sh
new file mode 100755
index 0000000..e0df32b
--- /dev/null
+++ b/1.580/plugins.sh
@@ -0,0 +1,17 @@
+#! /bin/bash
+
+# Parse a support-core plugin -style txt file as specification for jenkins plugins to be installed
+# in the reference directory, so user can define a derived Docker image with just :
+#
+# FROM jenkins
+# COPY plugins.txt /plugins.txt
+# RUN /usr/share/jenkins/plugins.sh /plugins.txt
+#
+
+REF=/usr/share/jenkins/ref/plugins
+mkdir -p $REF
+
+while read spec; do
+ plugin=(${spec//:/ });
+ curl -L ${JENKINS_UC}/download/plugins/${plugin[0]}/${plugin[1]}/${plugin[0]}.hpi -o $REF/${plugin[0]}.hpi;
+done < $1
diff --git a/1.581/Dockerfile b/1.581/Dockerfile
new file mode 100644
index 0000000..873713e
--- /dev/null
+++ b/1.581/Dockerfile
@@ -0,0 +1,45 @@
+FROM java:openjdk-7u65-jdk
+
+RUN apt-get update && apt-get install -y wget git curl zip && rm -rf /var/lib/apt/lists/*
+
+ENV JENKINS_HOME /var/jenkins_home
+
+# Jenkins is ran with user `jenkins`, uid = 1000
+# If you bind mount a volume from host/vloume from a data container,
+# ensure you use same uid
+RUN useradd -d "$JENKINS_HOME" -u 1000 -m -s /bin/bash jenkins
+
+# Jenkins home directoy is a volume, so configuration and build history
+# can be persisted and survive image upgrades
+VOLUME /var/jenkins_home
+
+# `/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
+
+
+COPY init.groovy /usr/share/jenkins/ref/init.groovy.d/tcp-slave-angent-port.groovy
+
+ENV JENKINS_VERSION 1.581
+
+# could use ADD but this one does not check Last-Modified header
+# see https://github.com/docker/docker/issues/8331
+RUN curl -L http://mirrors.jenkins-ci.org/war-stable/$JENKINS_VERSION/jenkins.war -o /usr/share/jenkins/jenkins.war
+
+ENV JENKINS_UC https://updates.jenkins-ci.org
+RUN chown -R jenkins "$JENKINS_HOME" /usr/share/jenkins/ref
+
+# for main web interface:
+EXPOSE 8080
+
+# will be used by attached slave agents:
+EXPOSE 50000
+
+USER jenkins
+
+COPY jenkins.sh /usr/local/bin/jenkins.sh
+ENTRYPOINT ["/usr/local/bin/jenkins.sh"]
+
+# from a derived Dockerfile, can use `RUN plugin.sh active.txt` to setup /usr/share/jenkins/ref/plugins from a support bundle
+COPY plugins.sh /usr/local/bin/plugins.sh
diff --git a/1.581/init.groovy b/1.581/init.groovy
new file mode 100644
index 0000000..83c3a3d
--- /dev/null
+++ b/1.581/init.groovy
@@ -0,0 +1,9 @@
+import hudson.model.*;
+import jenkins.model.*;
+
+
+Thread.start {
+ sleep 10000
+ println "--> setting agent port for jnlp"
+ Jenkins.instance.setSlaveAgentPort(50000)
+}
diff --git a/1.581/jenkins.sh b/1.581/jenkins.sh
new file mode 100755
index 0000000..1bd0f85
--- /dev/null
+++ b/1.581/jenkins.sh
@@ -0,0 +1,30 @@
+#! /bin/bash
+
+# Copy files from /usr/share/jenkins/ref into /var/jenkins_home
+# So the initial JENKINS-HOME is set with expected content.
+# Don't override, as this is just a reference setup, and use from UI
+# can then change this, upgrade plugins, etc.
+copy_reference_file() {
+ f=${1%/}
+ echo "$f"
+ rel=${f:23}
+ dir=$(dirname ${f})
+ echo " $f -> $rel"
+ if [[ ! -e /var/jenkins_home/${rel} ]]
+ then
+ echo "copy $rel to JENKINS_HOME"
+ mkdir -p /var/jenkins_home/${dir:23}
+ cp -r /usr/share/jenkins/ref/${rel} /var/jenkins_home/${rel};
+ fi;
+}
+export -f copy_reference_file
+find /usr/share/jenkins/ref/ -type f -exec bash -c 'copy_reference_file {}' \;
+
+# if `docker run` first argument start with `--` the user is passing jenkins launcher arguments
+if [[ $# -lt 1 ]] || [[ "$1" == "--"* ]]; then
+ exec java $JAVA_OPTS -jar /usr/share/jenkins/jenkins.war $JENKINS_OPTS "$@"
+fi
+
+# As argument is not jenkins, assume user want to run his own process, for sample a `bash` shell to explore this image
+exec "$@"
+
diff --git a/1.581/plugins.sh b/1.581/plugins.sh
new file mode 100755
index 0000000..e0df32b
--- /dev/null
+++ b/1.581/plugins.sh
@@ -0,0 +1,17 @@
+#! /bin/bash
+
+# Parse a support-core plugin -style txt file as specification for jenkins plugins to be installed
+# in the reference directory, so user can define a derived Docker image with just :
+#
+# FROM jenkins
+# COPY plugins.txt /plugins.txt
+# RUN /usr/share/jenkins/plugins.sh /plugins.txt
+#
+
+REF=/usr/share/jenkins/ref/plugins
+mkdir -p $REF
+
+while read spec; do
+ plugin=(${spec//:/ });
+ curl -L ${JENKINS_UC}/download/plugins/${plugin[0]}/${plugin[1]}/${plugin[0]}.hpi -o $REF/${plugin[0]}.hpi;
+done < $1
diff --git a/1.582/Dockerfile b/1.582/Dockerfile
new file mode 100644
index 0000000..a73fb68
--- /dev/null
+++ b/1.582/Dockerfile
@@ -0,0 +1,45 @@
+FROM java:openjdk-7u65-jdk
+
+RUN apt-get update && apt-get install -y wget git curl zip && rm -rf /var/lib/apt/lists/*
+
+ENV JENKINS_HOME /var/jenkins_home
+
+# Jenkins is ran with user `jenkins`, uid = 1000
+# If you bind mount a volume from host/vloume from a data container,
+# ensure you use same uid
+RUN useradd -d "$JENKINS_HOME" -u 1000 -m -s /bin/bash jenkins
+
+# Jenkins home directoy is a volume, so configuration and build history
+# can be persisted and survive image upgrades
+VOLUME /var/jenkins_home
+
+# `/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
+
+
+COPY init.groovy /usr/share/jenkins/ref/init.groovy.d/tcp-slave-angent-port.groovy
+
+ENV JENKINS_VERSION 1.582
+
+# could use ADD but this one does not check Last-Modified header
+# see https://github.com/docker/docker/issues/8331
+RUN curl -L http://mirrors.jenkins-ci.org/war-stable/$JENKINS_VERSION/jenkins.war -o /usr/share/jenkins/jenkins.war
+
+ENV JENKINS_UC https://updates.jenkins-ci.org
+RUN chown -R jenkins "$JENKINS_HOME" /usr/share/jenkins/ref
+
+# for main web interface:
+EXPOSE 8080
+
+# will be used by attached slave agents:
+EXPOSE 50000
+
+USER jenkins
+
+COPY jenkins.sh /usr/local/bin/jenkins.sh
+ENTRYPOINT ["/usr/local/bin/jenkins.sh"]
+
+# from a derived Dockerfile, can use `RUN plugin.sh active.txt` to setup /usr/share/jenkins/ref/plugins from a support bundle
+COPY plugins.sh /usr/local/bin/plugins.sh
diff --git a/1.582/init.groovy b/1.582/init.groovy
new file mode 100644
index 0000000..83c3a3d
--- /dev/null
+++ b/1.582/init.groovy
@@ -0,0 +1,9 @@
+import hudson.model.*;
+import jenkins.model.*;
+
+
+Thread.start {
+ sleep 10000
+ println "--> setting agent port for jnlp"
+ Jenkins.instance.setSlaveAgentPort(50000)
+}
diff --git a/1.582/jenkins.sh b/1.582/jenkins.sh
new file mode 100755
index 0000000..1bd0f85
--- /dev/null
+++ b/1.582/jenkins.sh
@@ -0,0 +1,30 @@
+#! /bin/bash
+
+# Copy files from /usr/share/jenkins/ref into /var/jenkins_home
+# So the initial JENKINS-HOME is set with expected content.
+# Don't override, as this is just a reference setup, and use from UI
+# can then change this, upgrade plugins, etc.
+copy_reference_file() {
+ f=${1%/}
+ echo "$f"
+ rel=${f:23}
+ dir=$(dirname ${f})
+ echo " $f -> $rel"
+ if [[ ! -e /var/jenkins_home/${rel} ]]
+ then
+ echo "copy $rel to JENKINS_HOME"
+ mkdir -p /var/jenkins_home/${dir:23}
+ cp -r /usr/share/jenkins/ref/${rel} /var/jenkins_home/${rel};
+ fi;
+}
+export -f copy_reference_file
+find /usr/share/jenkins/ref/ -type f -exec bash -c 'copy_reference_file {}' \;
+
+# if `docker run` first argument start with `--` the user is passing jenkins launcher arguments
+if [[ $# -lt 1 ]] || [[ "$1" == "--"* ]]; then
+ exec java $JAVA_OPTS -jar /usr/share/jenkins/jenkins.war $JENKINS_OPTS "$@"
+fi
+
+# As argument is not jenkins, assume user want to run his own process, for sample a `bash` shell to explore this image
+exec "$@"
+
diff --git a/1.582/plugins.sh b/1.582/plugins.sh
new file mode 100755
index 0000000..e0df32b
--- /dev/null
+++ b/1.582/plugins.sh
@@ -0,0 +1,17 @@
+#! /bin/bash
+
+# Parse a support-core plugin -style txt file as specification for jenkins plugins to be installed
+# in the reference directory, so user can define a derived Docker image with just :
+#
+# FROM jenkins
+# COPY plugins.txt /plugins.txt
+# RUN /usr/share/jenkins/plugins.sh /plugins.txt
+#
+
+REF=/usr/share/jenkins/ref/plugins
+mkdir -p $REF
+
+while read spec; do
+ plugin=(${spec//:/ });
+ curl -L ${JENKINS_UC}/download/plugins/${plugin[0]}/${plugin[1]}/${plugin[0]}.hpi -o $REF/${plugin[0]}.hpi;
+done < $1
diff --git a/1.583/Dockerfile b/1.583/Dockerfile
new file mode 100644
index 0000000..52aa247
--- /dev/null
+++ b/1.583/Dockerfile
@@ -0,0 +1,45 @@
+FROM java:openjdk-7u65-jdk
+
+RUN apt-get update && apt-get install -y wget git curl zip && rm -rf /var/lib/apt/lists/*
+
+ENV JENKINS_HOME /var/jenkins_home
+
+# Jenkins is ran with user `jenkins`, uid = 1000
+# If you bind mount a volume from host/vloume from a data container,
+# ensure you use same uid
+RUN useradd -d "$JENKINS_HOME" -u 1000 -m -s /bin/bash jenkins
+
+# Jenkins home directoy is a volume, so configuration and build history
+# can be persisted and survive image upgrades
+VOLUME /var/jenkins_home
+
+# `/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
+
+
+COPY init.groovy /usr/share/jenkins/ref/init.groovy.d/tcp-slave-angent-port.groovy
+
+ENV JENKINS_VERSION 1.583
+
+# could use ADD but this one does not check Last-Modified header
+# see https://github.com/docker/docker/issues/8331
+RUN curl -L http://mirrors.jenkins-ci.org/war-stable/$JENKINS_VERSION/jenkins.war -o /usr/share/jenkins/jenkins.war
+
+ENV JENKINS_UC https://updates.jenkins-ci.org
+RUN chown -R jenkins "$JENKINS_HOME" /usr/share/jenkins/ref
+
+# for main web interface:
+EXPOSE 8080
+
+# will be used by attached slave agents:
+EXPOSE 50000
+
+USER jenkins
+
+COPY jenkins.sh /usr/local/bin/jenkins.sh
+ENTRYPOINT ["/usr/local/bin/jenkins.sh"]
+
+# from a derived Dockerfile, can use `RUN plugin.sh active.txt` to setup /usr/share/jenkins/ref/plugins from a support bundle
+COPY plugins.sh /usr/local/bin/plugins.sh
diff --git a/1.583/init.groovy b/1.583/init.groovy
new file mode 100644
index 0000000..83c3a3d
--- /dev/null
+++ b/1.583/init.groovy
@@ -0,0 +1,9 @@
+import hudson.model.*;
+import jenkins.model.*;
+
+
+Thread.start {
+ sleep 10000
+ println "--> setting agent port for jnlp"
+ Jenkins.instance.setSlaveAgentPort(50000)
+}
diff --git a/1.583/jenkins.sh b/1.583/jenkins.sh
new file mode 100755
index 0000000..1bd0f85
--- /dev/null
+++ b/1.583/jenkins.sh
@@ -0,0 +1,30 @@
+#! /bin/bash
+
+# Copy files from /usr/share/jenkins/ref into /var/jenkins_home
+# So the initial JENKINS-HOME is set with expected content.
+# Don't override, as this is just a reference setup, and use from UI
+# can then change this, upgrade plugins, etc.
+copy_reference_file() {
+ f=${1%/}
+ echo "$f"
+ rel=${f:23}
+ dir=$(dirname ${f})
+ echo " $f -> $rel"
+ if [[ ! -e /var/jenkins_home/${rel} ]]
+ then
+ echo "copy $rel to JENKINS_HOME"
+ mkdir -p /var/jenkins_home/${dir:23}
+ cp -r /usr/share/jenkins/ref/${rel} /var/jenkins_home/${rel};
+ fi;
+}
+export -f copy_reference_file
+find /usr/share/jenkins/ref/ -type f -exec bash -c 'copy_reference_file {}' \;
+
+# if `docker run` first argument start with `--` the user is passing jenkins launcher arguments
+if [[ $# -lt 1 ]] || [[ "$1" == "--"* ]]; then
+ exec java $JAVA_OPTS -jar /usr/share/jenkins/jenkins.war $JENKINS_OPTS "$@"
+fi
+
+# As argument is not jenkins, assume user want to run his own process, for sample a `bash` shell to explore this image
+exec "$@"
+
diff --git a/1.583/plugins.sh b/1.583/plugins.sh
new file mode 100755
index 0000000..e0df32b
--- /dev/null
+++ b/1.583/plugins.sh
@@ -0,0 +1,17 @@
+#! /bin/bash
+
+# Parse a support-core plugin -style txt file as specification for jenkins plugins to be installed
+# in the reference directory, so user can define a derived Docker image with just :
+#
+# FROM jenkins
+# COPY plugins.txt /plugins.txt
+# RUN /usr/share/jenkins/plugins.sh /plugins.txt
+#
+
+REF=/usr/share/jenkins/ref/plugins
+mkdir -p $REF
+
+while read spec; do
+ plugin=(${spec//:/ });
+ curl -L ${JENKINS_UC}/download/plugins/${plugin[0]}/${plugin[1]}/${plugin[0]}.hpi -o $REF/${plugin[0]}.hpi;
+done < $1
diff --git a/1.584/Dockerfile b/1.584/Dockerfile
new file mode 100644
index 0000000..9ca9a8b
--- /dev/null
+++ b/1.584/Dockerfile
@@ -0,0 +1,45 @@
+FROM java:openjdk-7u65-jdk
+
+RUN apt-get update && apt-get install -y wget git curl zip && rm -rf /var/lib/apt/lists/*
+
+ENV JENKINS_HOME /var/jenkins_home
+
+# Jenkins is ran with user `jenkins`, uid = 1000
+# If you bind mount a volume from host/vloume from a data container,
+# ensure you use same uid
+RUN useradd -d "$JENKINS_HOME" -u 1000 -m -s /bin/bash jenkins
+
+# Jenkins home directoy is a volume, so configuration and build history
+# can be persisted and survive image upgrades
+VOLUME /var/jenkins_home
+
+# `/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
+
+
+COPY init.groovy /usr/share/jenkins/ref/init.groovy.d/tcp-slave-angent-port.groovy
+
+ENV JENKINS_VERSION 1.584
+
+# could use ADD but this one does not check Last-Modified header
+# see https://github.com/docker/docker/issues/8331
+RUN curl -L http://mirrors.jenkins-ci.org/war-stable/$JENKINS_VERSION/jenkins.war -o /usr/share/jenkins/jenkins.war
+
+ENV JENKINS_UC https://updates.jenkins-ci.org
+RUN chown -R jenkins "$JENKINS_HOME" /usr/share/jenkins/ref
+
+# for main web interface:
+EXPOSE 8080
+
+# will be used by attached slave agents:
+EXPOSE 50000
+
+USER jenkins
+
+COPY jenkins.sh /usr/local/bin/jenkins.sh
+ENTRYPOINT ["/usr/local/bin/jenkins.sh"]
+
+# from a derived Dockerfile, can use `RUN plugin.sh active.txt` to setup /usr/share/jenkins/ref/plugins from a support bundle
+COPY plugins.sh /usr/local/bin/plugins.sh
diff --git a/1.584/init.groovy b/1.584/init.groovy
new file mode 100644
index 0000000..83c3a3d
--- /dev/null
+++ b/1.584/init.groovy
@@ -0,0 +1,9 @@
+import hudson.model.*;
+import jenkins.model.*;
+
+
+Thread.start {
+ sleep 10000
+ println "--> setting agent port for jnlp"
+ Jenkins.instance.setSlaveAgentPort(50000)
+}
diff --git a/1.584/jenkins.sh b/1.584/jenkins.sh
new file mode 100755
index 0000000..1bd0f85
--- /dev/null
+++ b/1.584/jenkins.sh
@@ -0,0 +1,30 @@
+#! /bin/bash
+
+# Copy files from /usr/share/jenkins/ref into /var/jenkins_home
+# So the initial JENKINS-HOME is set with expected content.
+# Don't override, as this is just a reference setup, and use from UI
+# can then change this, upgrade plugins, etc.
+copy_reference_file() {
+ f=${1%/}
+ echo "$f"
+ rel=${f:23}
+ dir=$(dirname ${f})
+ echo " $f -> $rel"
+ if [[ ! -e /var/jenkins_home/${rel} ]]
+ then
+ echo "copy $rel to JENKINS_HOME"
+ mkdir -p /var/jenkins_home/${dir:23}
+ cp -r /usr/share/jenkins/ref/${rel} /var/jenkins_home/${rel};
+ fi;
+}
+export -f copy_reference_file
+find /usr/share/jenkins/ref/ -type f -exec bash -c 'copy_reference_file {}' \;
+
+# if `docker run` first argument start with `--` the user is passing jenkins launcher arguments
+if [[ $# -lt 1 ]] || [[ "$1" == "--"* ]]; then
+ exec java $JAVA_OPTS -jar /usr/share/jenkins/jenkins.war $JENKINS_OPTS "$@"
+fi
+
+# As argument is not jenkins, assume user want to run his own process, for sample a `bash` shell to explore this image
+exec "$@"
+
diff --git a/1.584/plugins.sh b/1.584/plugins.sh
new file mode 100755
index 0000000..e0df32b
--- /dev/null
+++ b/1.584/plugins.sh
@@ -0,0 +1,17 @@
+#! /bin/bash
+
+# Parse a support-core plugin -style txt file as specification for jenkins plugins to be installed
+# in the reference directory, so user can define a derived Docker image with just :
+#
+# FROM jenkins
+# COPY plugins.txt /plugins.txt
+# RUN /usr/share/jenkins/plugins.sh /plugins.txt
+#
+
+REF=/usr/share/jenkins/ref/plugins
+mkdir -p $REF
+
+while read spec; do
+ plugin=(${spec//:/ });
+ curl -L ${JENKINS_UC}/download/plugins/${plugin[0]}/${plugin[1]}/${plugin[0]}.hpi -o $REF/${plugin[0]}.hpi;
+done < $1
diff --git a/1.585/Dockerfile b/1.585/Dockerfile
new file mode 100644
index 0000000..8e3ffd0
--- /dev/null
+++ b/1.585/Dockerfile
@@ -0,0 +1,45 @@
+FROM java:openjdk-7u65-jdk
+
+RUN apt-get update && apt-get install -y wget git curl zip && rm -rf /var/lib/apt/lists/*
+
+ENV JENKINS_HOME /var/jenkins_home
+
+# Jenkins is ran with user `jenkins`, uid = 1000
+# If you bind mount a volume from host/vloume from a data container,
+# ensure you use same uid
+RUN useradd -d "$JENKINS_HOME" -u 1000 -m -s /bin/bash jenkins
+
+# Jenkins home directoy is a volume, so configuration and build history
+# can be persisted and survive image upgrades
+VOLUME /var/jenkins_home
+
+# `/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
+
+
+COPY init.groovy /usr/share/jenkins/ref/init.groovy.d/tcp-slave-angent-port.groovy
+
+ENV JENKINS_VERSION 1.585
+
+# could use ADD but this one does not check Last-Modified header
+# see https://github.com/docker/docker/issues/8331
+RUN curl -L http://mirrors.jenkins-ci.org/war-stable/$JENKINS_VERSION/jenkins.war -o /usr/share/jenkins/jenkins.war
+
+ENV JENKINS_UC https://updates.jenkins-ci.org
+RUN chown -R jenkins "$JENKINS_HOME" /usr/share/jenkins/ref
+
+# for main web interface:
+EXPOSE 8080
+
+# will be used by attached slave agents:
+EXPOSE 50000
+
+USER jenkins
+
+COPY jenkins.sh /usr/local/bin/jenkins.sh
+ENTRYPOINT ["/usr/local/bin/jenkins.sh"]
+
+# from a derived Dockerfile, can use `RUN plugin.sh active.txt` to setup /usr/share/jenkins/ref/plugins from a support bundle
+COPY plugins.sh /usr/local/bin/plugins.sh
diff --git a/1.585/init.groovy b/1.585/init.groovy
new file mode 100644
index 0000000..83c3a3d
--- /dev/null
+++ b/1.585/init.groovy
@@ -0,0 +1,9 @@
+import hudson.model.*;
+import jenkins.model.*;
+
+
+Thread.start {
+ sleep 10000
+ println "--> setting agent port for jnlp"
+ Jenkins.instance.setSlaveAgentPort(50000)
+}
diff --git a/1.585/jenkins.sh b/1.585/jenkins.sh
new file mode 100755
index 0000000..1bd0f85
--- /dev/null
+++ b/1.585/jenkins.sh
@@ -0,0 +1,30 @@
+#! /bin/bash
+
+# Copy files from /usr/share/jenkins/ref into /var/jenkins_home
+# So the initial JENKINS-HOME is set with expected content.
+# Don't override, as this is just a reference setup, and use from UI
+# can then change this, upgrade plugins, etc.
+copy_reference_file() {
+ f=${1%/}
+ echo "$f"
+ rel=${f:23}
+ dir=$(dirname ${f})
+ echo " $f -> $rel"
+ if [[ ! -e /var/jenkins_home/${rel} ]]
+ then
+ echo "copy $rel to JENKINS_HOME"
+ mkdir -p /var/jenkins_home/${dir:23}
+ cp -r /usr/share/jenkins/ref/${rel} /var/jenkins_home/${rel};
+ fi;
+}
+export -f copy_reference_file
+find /usr/share/jenkins/ref/ -type f -exec bash -c 'copy_reference_file {}' \;
+
+# if `docker run` first argument start with `--` the user is passing jenkins launcher arguments
+if [[ $# -lt 1 ]] || [[ "$1" == "--"* ]]; then
+ exec java $JAVA_OPTS -jar /usr/share/jenkins/jenkins.war $JENKINS_OPTS "$@"
+fi
+
+# As argument is not jenkins, assume user want to run his own process, for sample a `bash` shell to explore this image
+exec "$@"
+
diff --git a/1.585/plugins.sh b/1.585/plugins.sh
new file mode 100755
index 0000000..e0df32b
--- /dev/null
+++ b/1.585/plugins.sh
@@ -0,0 +1,17 @@
+#! /bin/bash
+
+# Parse a support-core plugin -style txt file as specification for jenkins plugins to be installed
+# in the reference directory, so user can define a derived Docker image with just :
+#
+# FROM jenkins
+# COPY plugins.txt /plugins.txt
+# RUN /usr/share/jenkins/plugins.sh /plugins.txt
+#
+
+REF=/usr/share/jenkins/ref/plugins
+mkdir -p $REF
+
+while read spec; do
+ plugin=(${spec//:/ });
+ curl -L ${JENKINS_UC}/download/plugins/${plugin[0]}/${plugin[1]}/${plugin[0]}.hpi -o $REF/${plugin[0]}.hpi;
+done < $1
diff --git a/1.586/Dockerfile b/1.586/Dockerfile
new file mode 100644
index 0000000..a29f937
--- /dev/null
+++ b/1.586/Dockerfile
@@ -0,0 +1,45 @@
+FROM java:openjdk-7u65-jdk
+
+RUN apt-get update && apt-get install -y wget git curl zip && rm -rf /var/lib/apt/lists/*
+
+ENV JENKINS_HOME /var/jenkins_home
+
+# Jenkins is ran with user `jenkins`, uid = 1000
+# If you bind mount a volume from host/vloume from a data container,
+# ensure you use same uid
+RUN useradd -d "$JENKINS_HOME" -u 1000 -m -s /bin/bash jenkins
+
+# Jenkins home directoy is a volume, so configuration and build history
+# can be persisted and survive image upgrades
+VOLUME /var/jenkins_home
+
+# `/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
+
+
+COPY init.groovy /usr/share/jenkins/ref/init.groovy.d/tcp-slave-angent-port.groovy
+
+ENV JENKINS_VERSION 1.586
+
+# could use ADD but this one does not check Last-Modified header
+# see https://github.com/docker/docker/issues/8331
+RUN curl -L http://mirrors.jenkins-ci.org/war-stable/$JENKINS_VERSION/jenkins.war -o /usr/share/jenkins/jenkins.war
+
+ENV JENKINS_UC https://updates.jenkins-ci.org
+RUN chown -R jenkins "$JENKINS_HOME" /usr/share/jenkins/ref
+
+# for main web interface:
+EXPOSE 8080
+
+# will be used by attached slave agents:
+EXPOSE 50000
+
+USER jenkins
+
+COPY jenkins.sh /usr/local/bin/jenkins.sh
+ENTRYPOINT ["/usr/local/bin/jenkins.sh"]
+
+# from a derived Dockerfile, can use `RUN plugin.sh active.txt` to setup /usr/share/jenkins/ref/plugins from a support bundle
+COPY plugins.sh /usr/local/bin/plugins.sh
diff --git a/1.586/init.groovy b/1.586/init.groovy
new file mode 100644
index 0000000..83c3a3d
--- /dev/null
+++ b/1.586/init.groovy
@@ -0,0 +1,9 @@
+import hudson.model.*;
+import jenkins.model.*;
+
+
+Thread.start {
+ sleep 10000
+ println "--> setting agent port for jnlp"
+ Jenkins.instance.setSlaveAgentPort(50000)
+}
diff --git a/1.586/jenkins.sh b/1.586/jenkins.sh
new file mode 100755
index 0000000..1bd0f85
--- /dev/null
+++ b/1.586/jenkins.sh
@@ -0,0 +1,30 @@
+#! /bin/bash
+
+# Copy files from /usr/share/jenkins/ref into /var/jenkins_home
+# So the initial JENKINS-HOME is set with expected content.
+# Don't override, as this is just a reference setup, and use from UI
+# can then change this, upgrade plugins, etc.
+copy_reference_file() {
+ f=${1%/}
+ echo "$f"
+ rel=${f:23}
+ dir=$(dirname ${f})
+ echo " $f -> $rel"
+ if [[ ! -e /var/jenkins_home/${rel} ]]
+ then
+ echo "copy $rel to JENKINS_HOME"
+ mkdir -p /var/jenkins_home/${dir:23}
+ cp -r /usr/share/jenkins/ref/${rel} /var/jenkins_home/${rel};
+ fi;
+}
+export -f copy_reference_file
+find /usr/share/jenkins/ref/ -type f -exec bash -c 'copy_reference_file {}' \;
+
+# if `docker run` first argument start with `--` the user is passing jenkins launcher arguments
+if [[ $# -lt 1 ]] || [[ "$1" == "--"* ]]; then
+ exec java $JAVA_OPTS -jar /usr/share/jenkins/jenkins.war $JENKINS_OPTS "$@"
+fi
+
+# As argument is not jenkins, assume user want to run his own process, for sample a `bash` shell to explore this image
+exec "$@"
+
diff --git a/1.586/plugins.sh b/1.586/plugins.sh
new file mode 100755
index 0000000..e0df32b
--- /dev/null
+++ b/1.586/plugins.sh
@@ -0,0 +1,17 @@
+#! /bin/bash
+
+# Parse a support-core plugin -style txt file as specification for jenkins plugins to be installed
+# in the reference directory, so user can define a derived Docker image with just :
+#
+# FROM jenkins
+# COPY plugins.txt /plugins.txt
+# RUN /usr/share/jenkins/plugins.sh /plugins.txt
+#
+
+REF=/usr/share/jenkins/ref/plugins
+mkdir -p $REF
+
+while read spec; do
+ plugin=(${spec//:/ });
+ curl -L ${JENKINS_UC}/download/plugins/${plugin[0]}/${plugin[1]}/${plugin[0]}.hpi -o $REF/${plugin[0]}.hpi;
+done < $1
diff --git a/1.587/Dockerfile b/1.587/Dockerfile
new file mode 100644
index 0000000..1516f53
--- /dev/null
+++ b/1.587/Dockerfile
@@ -0,0 +1,45 @@
+FROM java:openjdk-7u65-jdk
+
+RUN apt-get update && apt-get install -y wget git curl zip && rm -rf /var/lib/apt/lists/*
+
+ENV JENKINS_HOME /var/jenkins_home
+
+# Jenkins is ran with user `jenkins`, uid = 1000
+# If you bind mount a volume from host/vloume from a data container,
+# ensure you use same uid
+RUN useradd -d "$JENKINS_HOME" -u 1000 -m -s /bin/bash jenkins
+
+# Jenkins home directoy is a volume, so configuration and build history
+# can be persisted and survive image upgrades
+VOLUME /var/jenkins_home
+
+# `/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
+
+
+COPY init.groovy /usr/share/jenkins/ref/init.groovy.d/tcp-slave-angent-port.groovy
+
+ENV JENKINS_VERSION 1.587
+
+# could use ADD but this one does not check Last-Modified header
+# see https://github.com/docker/docker/issues/8331
+RUN curl -L http://mirrors.jenkins-ci.org/war-stable/$JENKINS_VERSION/jenkins.war -o /usr/share/jenkins/jenkins.war
+
+ENV JENKINS_UC https://updates.jenkins-ci.org
+RUN chown -R jenkins "$JENKINS_HOME" /usr/share/jenkins/ref
+
+# for main web interface:
+EXPOSE 8080
+
+# will be used by attached slave agents:
+EXPOSE 50000
+
+USER jenkins
+
+COPY jenkins.sh /usr/local/bin/jenkins.sh
+ENTRYPOINT ["/usr/local/bin/jenkins.sh"]
+
+# from a derived Dockerfile, can use `RUN plugin.sh active.txt` to setup /usr/share/jenkins/ref/plugins from a support bundle
+COPY plugins.sh /usr/local/bin/plugins.sh
diff --git a/1.587/init.groovy b/1.587/init.groovy
new file mode 100644
index 0000000..83c3a3d
--- /dev/null
+++ b/1.587/init.groovy
@@ -0,0 +1,9 @@
+import hudson.model.*;
+import jenkins.model.*;
+
+
+Thread.start {
+ sleep 10000
+ println "--> setting agent port for jnlp"
+ Jenkins.instance.setSlaveAgentPort(50000)
+}
diff --git a/1.587/jenkins.sh b/1.587/jenkins.sh
new file mode 100755
index 0000000..1bd0f85
--- /dev/null
+++ b/1.587/jenkins.sh
@@ -0,0 +1,30 @@
+#! /bin/bash
+
+# Copy files from /usr/share/jenkins/ref into /var/jenkins_home
+# So the initial JENKINS-HOME is set with expected content.
+# Don't override, as this is just a reference setup, and use from UI
+# can then change this, upgrade plugins, etc.
+copy_reference_file() {
+ f=${1%/}
+ echo "$f"
+ rel=${f:23}
+ dir=$(dirname ${f})
+ echo " $f -> $rel"
+ if [[ ! -e /var/jenkins_home/${rel} ]]
+ then
+ echo "copy $rel to JENKINS_HOME"
+ mkdir -p /var/jenkins_home/${dir:23}
+ cp -r /usr/share/jenkins/ref/${rel} /var/jenkins_home/${rel};
+ fi;
+}
+export -f copy_reference_file
+find /usr/share/jenkins/ref/ -type f -exec bash -c 'copy_reference_file {}' \;
+
+# if `docker run` first argument start with `--` the user is passing jenkins launcher arguments
+if [[ $# -lt 1 ]] || [[ "$1" == "--"* ]]; then
+ exec java $JAVA_OPTS -jar /usr/share/jenkins/jenkins.war $JENKINS_OPTS "$@"
+fi
+
+# As argument is not jenkins, assume user want to run his own process, for sample a `bash` shell to explore this image
+exec "$@"
+
diff --git a/1.587/plugins.sh b/1.587/plugins.sh
new file mode 100755
index 0000000..e0df32b
--- /dev/null
+++ b/1.587/plugins.sh
@@ -0,0 +1,17 @@
+#! /bin/bash
+
+# Parse a support-core plugin -style txt file as specification for jenkins plugins to be installed
+# in the reference directory, so user can define a derived Docker image with just :
+#
+# FROM jenkins
+# COPY plugins.txt /plugins.txt
+# RUN /usr/share/jenkins/plugins.sh /plugins.txt
+#
+
+REF=/usr/share/jenkins/ref/plugins
+mkdir -p $REF
+
+while read spec; do
+ plugin=(${spec//:/ });
+ curl -L ${JENKINS_UC}/download/plugins/${plugin[0]}/${plugin[1]}/${plugin[0]}.hpi -o $REF/${plugin[0]}.hpi;
+done < $1
diff --git a/1.588/Dockerfile b/1.588/Dockerfile
new file mode 100644
index 0000000..827a3f7
--- /dev/null
+++ b/1.588/Dockerfile
@@ -0,0 +1,45 @@
+FROM java:openjdk-7u65-jdk
+
+RUN apt-get update && apt-get install -y wget git curl zip && rm -rf /var/lib/apt/lists/*
+
+ENV JENKINS_HOME /var/jenkins_home
+
+# Jenkins is ran with user `jenkins`, uid = 1000
+# If you bind mount a volume from host/vloume from a data container,
+# ensure you use same uid
+RUN useradd -d "$JENKINS_HOME" -u 1000 -m -s /bin/bash jenkins
+
+# Jenkins home directoy is a volume, so configuration and build history
+# can be persisted and survive image upgrades
+VOLUME /var/jenkins_home
+
+# `/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
+
+
+COPY init.groovy /usr/share/jenkins/ref/init.groovy.d/tcp-slave-angent-port.groovy
+
+ENV JENKINS_VERSION 1.588
+
+# could use ADD but this one does not check Last-Modified header
+# see https://github.com/docker/docker/issues/8331
+RUN curl -L http://mirrors.jenkins-ci.org/war-stable/$JENKINS_VERSION/jenkins.war -o /usr/share/jenkins/jenkins.war
+
+ENV JENKINS_UC https://updates.jenkins-ci.org
+RUN chown -R jenkins "$JENKINS_HOME" /usr/share/jenkins/ref
+
+# for main web interface:
+EXPOSE 8080
+
+# will be used by attached slave agents:
+EXPOSE 50000
+
+USER jenkins
+
+COPY jenkins.sh /usr/local/bin/jenkins.sh
+ENTRYPOINT ["/usr/local/bin/jenkins.sh"]
+
+# from a derived Dockerfile, can use `RUN plugin.sh active.txt` to setup /usr/share/jenkins/ref/plugins from a support bundle
+COPY plugins.sh /usr/local/bin/plugins.sh
diff --git a/1.588/init.groovy b/1.588/init.groovy
new file mode 100644
index 0000000..83c3a3d
--- /dev/null
+++ b/1.588/init.groovy
@@ -0,0 +1,9 @@
+import hudson.model.*;
+import jenkins.model.*;
+
+
+Thread.start {
+ sleep 10000
+ println "--> setting agent port for jnlp"
+ Jenkins.instance.setSlaveAgentPort(50000)
+}
diff --git a/1.588/jenkins.sh b/1.588/jenkins.sh
new file mode 100755
index 0000000..1bd0f85
--- /dev/null
+++ b/1.588/jenkins.sh
@@ -0,0 +1,30 @@
+#! /bin/bash
+
+# Copy files from /usr/share/jenkins/ref into /var/jenkins_home
+# So the initial JENKINS-HOME is set with expected content.
+# Don't override, as this is just a reference setup, and use from UI
+# can then change this, upgrade plugins, etc.
+copy_reference_file() {
+ f=${1%/}
+ echo "$f"
+ rel=${f:23}
+ dir=$(dirname ${f})
+ echo " $f -> $rel"
+ if [[ ! -e /var/jenkins_home/${rel} ]]
+ then
+ echo "copy $rel to JENKINS_HOME"
+ mkdir -p /var/jenkins_home/${dir:23}
+ cp -r /usr/share/jenkins/ref/${rel} /var/jenkins_home/${rel};
+ fi;
+}
+export -f copy_reference_file
+find /usr/share/jenkins/ref/ -type f -exec bash -c 'copy_reference_file {}' \;
+
+# if `docker run` first argument start with `--` the user is passing jenkins launcher arguments
+if [[ $# -lt 1 ]] || [[ "$1" == "--"* ]]; then
+ exec java $JAVA_OPTS -jar /usr/share/jenkins/jenkins.war $JENKINS_OPTS "$@"
+fi
+
+# As argument is not jenkins, assume user want to run his own process, for sample a `bash` shell to explore this image
+exec "$@"
+
diff --git a/1.588/plugins.sh b/1.588/plugins.sh
new file mode 100755
index 0000000..e0df32b
--- /dev/null
+++ b/1.588/plugins.sh
@@ -0,0 +1,17 @@
+#! /bin/bash
+
+# Parse a support-core plugin -style txt file as specification for jenkins plugins to be installed
+# in the reference directory, so user can define a derived Docker image with just :
+#
+# FROM jenkins
+# COPY plugins.txt /plugins.txt
+# RUN /usr/share/jenkins/plugins.sh /plugins.txt
+#
+
+REF=/usr/share/jenkins/ref/plugins
+mkdir -p $REF
+
+while read spec; do
+ plugin=(${spec//:/ });
+ curl -L ${JENKINS_UC}/download/plugins/${plugin[0]}/${plugin[1]}/${plugin[0]}.hpi -o $REF/${plugin[0]}.hpi;
+done < $1
diff --git a/1.589/Dockerfile b/1.589/Dockerfile
new file mode 100644
index 0000000..714ff6b
--- /dev/null
+++ b/1.589/Dockerfile
@@ -0,0 +1,45 @@
+FROM java:openjdk-7u65-jdk
+
+RUN apt-get update && apt-get install -y wget git curl zip && rm -rf /var/lib/apt/lists/*
+
+ENV JENKINS_HOME /var/jenkins_home
+
+# Jenkins is ran with user `jenkins`, uid = 1000
+# If you bind mount a volume from host/vloume from a data container,
+# ensure you use same uid
+RUN useradd -d "$JENKINS_HOME" -u 1000 -m -s /bin/bash jenkins
+
+# Jenkins home directoy is a volume, so configuration and build history
+# can be persisted and survive image upgrades
+VOLUME /var/jenkins_home
+
+# `/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
+
+
+COPY init.groovy /usr/share/jenkins/ref/init.groovy.d/tcp-slave-angent-port.groovy
+
+ENV JENKINS_VERSION 1.589
+
+# could use ADD but this one does not check Last-Modified header
+# see https://github.com/docker/docker/issues/8331
+RUN curl -L http://mirrors.jenkins-ci.org/war-stable/$JENKINS_VERSION/jenkins.war -o /usr/share/jenkins/jenkins.war
+
+ENV JENKINS_UC https://updates.jenkins-ci.org
+RUN chown -R jenkins "$JENKINS_HOME" /usr/share/jenkins/ref
+
+# for main web interface:
+EXPOSE 8080
+
+# will be used by attached slave agents:
+EXPOSE 50000
+
+USER jenkins
+
+COPY jenkins.sh /usr/local/bin/jenkins.sh
+ENTRYPOINT ["/usr/local/bin/jenkins.sh"]
+
+# from a derived Dockerfile, can use `RUN plugin.sh active.txt` to setup /usr/share/jenkins/ref/plugins from a support bundle
+COPY plugins.sh /usr/local/bin/plugins.sh
diff --git a/1.589/init.groovy b/1.589/init.groovy
new file mode 100644
index 0000000..83c3a3d
--- /dev/null
+++ b/1.589/init.groovy
@@ -0,0 +1,9 @@
+import hudson.model.*;
+import jenkins.model.*;
+
+
+Thread.start {
+ sleep 10000
+ println "--> setting agent port for jnlp"
+ Jenkins.instance.setSlaveAgentPort(50000)
+}
diff --git a/1.589/jenkins.sh b/1.589/jenkins.sh
new file mode 100755
index 0000000..1bd0f85
--- /dev/null
+++ b/1.589/jenkins.sh
@@ -0,0 +1,30 @@
+#! /bin/bash
+
+# Copy files from /usr/share/jenkins/ref into /var/jenkins_home
+# So the initial JENKINS-HOME is set with expected content.
+# Don't override, as this is just a reference setup, and use from UI
+# can then change this, upgrade plugins, etc.
+copy_reference_file() {
+ f=${1%/}
+ echo "$f"
+ rel=${f:23}
+ dir=$(dirname ${f})
+ echo " $f -> $rel"
+ if [[ ! -e /var/jenkins_home/${rel} ]]
+ then
+ echo "copy $rel to JENKINS_HOME"
+ mkdir -p /var/jenkins_home/${dir:23}
+ cp -r /usr/share/jenkins/ref/${rel} /var/jenkins_home/${rel};
+ fi;
+}
+export -f copy_reference_file
+find /usr/share/jenkins/ref/ -type f -exec bash -c 'copy_reference_file {}' \;
+
+# if `docker run` first argument start with `--` the user is passing jenkins launcher arguments
+if [[ $# -lt 1 ]] || [[ "$1" == "--"* ]]; then
+ exec java $JAVA_OPTS -jar /usr/share/jenkins/jenkins.war $JENKINS_OPTS "$@"
+fi
+
+# As argument is not jenkins, assume user want to run his own process, for sample a `bash` shell to explore this image
+exec "$@"
+
diff --git a/1.589/plugins.sh b/1.589/plugins.sh
new file mode 100755
index 0000000..e0df32b
--- /dev/null
+++ b/1.589/plugins.sh
@@ -0,0 +1,17 @@
+#! /bin/bash
+
+# Parse a support-core plugin -style txt file as specification for jenkins plugins to be installed
+# in the reference directory, so user can define a derived Docker image with just :
+#
+# FROM jenkins
+# COPY plugins.txt /plugins.txt
+# RUN /usr/share/jenkins/plugins.sh /plugins.txt
+#
+
+REF=/usr/share/jenkins/ref/plugins
+mkdir -p $REF
+
+while read spec; do
+ plugin=(${spec//:/ });
+ curl -L ${JENKINS_UC}/download/plugins/${plugin[0]}/${plugin[1]}/${plugin[0]}.hpi -o $REF/${plugin[0]}.hpi;
+done < $1
diff --git a/1.590/Dockerfile b/1.590/Dockerfile
new file mode 100644
index 0000000..746e373
--- /dev/null
+++ b/1.590/Dockerfile
@@ -0,0 +1,45 @@
+FROM java:openjdk-7u65-jdk
+
+RUN apt-get update && apt-get install -y wget git curl zip && rm -rf /var/lib/apt/lists/*
+
+ENV JENKINS_HOME /var/jenkins_home
+
+# Jenkins is ran with user `jenkins`, uid = 1000
+# If you bind mount a volume from host/vloume from a data container,
+# ensure you use same uid
+RUN useradd -d "$JENKINS_HOME" -u 1000 -m -s /bin/bash jenkins
+
+# Jenkins home directoy is a volume, so configuration and build history
+# can be persisted and survive image upgrades
+VOLUME /var/jenkins_home
+
+# `/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
+
+
+COPY init.groovy /usr/share/jenkins/ref/init.groovy.d/tcp-slave-angent-port.groovy
+
+ENV JENKINS_VERSION 1.590
+
+# could use ADD but this one does not check Last-Modified header
+# see https://github.com/docker/docker/issues/8331
+RUN curl -L http://mirrors.jenkins-ci.org/war-stable/$JENKINS_VERSION/jenkins.war -o /usr/share/jenkins/jenkins.war
+
+ENV JENKINS_UC https://updates.jenkins-ci.org
+RUN chown -R jenkins "$JENKINS_HOME" /usr/share/jenkins/ref
+
+# for main web interface:
+EXPOSE 8080
+
+# will be used by attached slave agents:
+EXPOSE 50000
+
+USER jenkins
+
+COPY jenkins.sh /usr/local/bin/jenkins.sh
+ENTRYPOINT ["/usr/local/bin/jenkins.sh"]
+
+# from a derived Dockerfile, can use `RUN plugin.sh active.txt` to setup /usr/share/jenkins/ref/plugins from a support bundle
+COPY plugins.sh /usr/local/bin/plugins.sh
diff --git a/1.590/init.groovy b/1.590/init.groovy
new file mode 100644
index 0000000..83c3a3d
--- /dev/null
+++ b/1.590/init.groovy
@@ -0,0 +1,9 @@
+import hudson.model.*;
+import jenkins.model.*;
+
+
+Thread.start {
+ sleep 10000
+ println "--> setting agent port for jnlp"
+ Jenkins.instance.setSlaveAgentPort(50000)
+}
diff --git a/1.590/jenkins.sh b/1.590/jenkins.sh
new file mode 100755
index 0000000..1bd0f85
--- /dev/null
+++ b/1.590/jenkins.sh
@@ -0,0 +1,30 @@
+#! /bin/bash
+
+# Copy files from /usr/share/jenkins/ref into /var/jenkins_home
+# So the initial JENKINS-HOME is set with expected content.
+# Don't override, as this is just a reference setup, and use from UI
+# can then change this, upgrade plugins, etc.
+copy_reference_file() {
+ f=${1%/}
+ echo "$f"
+ rel=${f:23}
+ dir=$(dirname ${f})
+ echo " $f -> $rel"
+ if [[ ! -e /var/jenkins_home/${rel} ]]
+ then
+ echo "copy $rel to JENKINS_HOME"
+ mkdir -p /var/jenkins_home/${dir:23}
+ cp -r /usr/share/jenkins/ref/${rel} /var/jenkins_home/${rel};
+ fi;
+}
+export -f copy_reference_file
+find /usr/share/jenkins/ref/ -type f -exec bash -c 'copy_reference_file {}' \;
+
+# if `docker run` first argument start with `--` the user is passing jenkins launcher arguments
+if [[ $# -lt 1 ]] || [[ "$1" == "--"* ]]; then
+ exec java $JAVA_OPTS -jar /usr/share/jenkins/jenkins.war $JENKINS_OPTS "$@"
+fi
+
+# As argument is not jenkins, assume user want to run his own process, for sample a `bash` shell to explore this image
+exec "$@"
+
diff --git a/1.590/plugins.sh b/1.590/plugins.sh
new file mode 100755
index 0000000..e0df32b
--- /dev/null
+++ b/1.590/plugins.sh
@@ -0,0 +1,17 @@
+#! /bin/bash
+
+# Parse a support-core plugin -style txt file as specification for jenkins plugins to be installed
+# in the reference directory, so user can define a derived Docker image with just :
+#
+# FROM jenkins
+# COPY plugins.txt /plugins.txt
+# RUN /usr/share/jenkins/plugins.sh /plugins.txt
+#
+
+REF=/usr/share/jenkins/ref/plugins
+mkdir -p $REF
+
+while read spec; do
+ plugin=(${spec//:/ });
+ curl -L ${JENKINS_UC}/download/plugins/${plugin[0]}/${plugin[1]}/${plugin[0]}.hpi -o $REF/${plugin[0]}.hpi;
+done < $1
diff --git a/1.591/Dockerfile b/1.591/Dockerfile
new file mode 100644
index 0000000..d17bda0
--- /dev/null
+++ b/1.591/Dockerfile
@@ -0,0 +1,45 @@
+FROM java:openjdk-7u65-jdk
+
+RUN apt-get update && apt-get install -y wget git curl zip && rm -rf /var/lib/apt/lists/*
+
+ENV JENKINS_HOME /var/jenkins_home
+
+# Jenkins is ran with user `jenkins`, uid = 1000
+# If you bind mount a volume from host/vloume from a data container,
+# ensure you use same uid
+RUN useradd -d "$JENKINS_HOME" -u 1000 -m -s /bin/bash jenkins
+
+# Jenkins home directoy is a volume, so configuration and build history
+# can be persisted and survive image upgrades
+VOLUME /var/jenkins_home
+
+# `/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
+
+
+COPY init.groovy /usr/share/jenkins/ref/init.groovy.d/tcp-slave-angent-port.groovy
+
+ENV JENKINS_VERSION 1.591
+
+# could use ADD but this one does not check Last-Modified header
+# see https://github.com/docker/docker/issues/8331
+RUN curl -L http://mirrors.jenkins-ci.org/war-stable/$JENKINS_VERSION/jenkins.war -o /usr/share/jenkins/jenkins.war
+
+ENV JENKINS_UC https://updates.jenkins-ci.org
+RUN chown -R jenkins "$JENKINS_HOME" /usr/share/jenkins/ref
+
+# for main web interface:
+EXPOSE 8080
+
+# will be used by attached slave agents:
+EXPOSE 50000
+
+USER jenkins
+
+COPY jenkins.sh /usr/local/bin/jenkins.sh
+ENTRYPOINT ["/usr/local/bin/jenkins.sh"]
+
+# from a derived Dockerfile, can use `RUN plugin.sh active.txt` to setup /usr/share/jenkins/ref/plugins from a support bundle
+COPY plugins.sh /usr/local/bin/plugins.sh
diff --git a/1.591/init.groovy b/1.591/init.groovy
new file mode 100644
index 0000000..83c3a3d
--- /dev/null
+++ b/1.591/init.groovy
@@ -0,0 +1,9 @@
+import hudson.model.*;
+import jenkins.model.*;
+
+
+Thread.start {
+ sleep 10000
+ println "--> setting agent port for jnlp"
+ Jenkins.instance.setSlaveAgentPort(50000)
+}
diff --git a/1.591/jenkins.sh b/1.591/jenkins.sh
new file mode 100755
index 0000000..1bd0f85
--- /dev/null
+++ b/1.591/jenkins.sh
@@ -0,0 +1,30 @@
+#! /bin/bash
+
+# Copy files from /usr/share/jenkins/ref into /var/jenkins_home
+# So the initial JENKINS-HOME is set with expected content.
+# Don't override, as this is just a reference setup, and use from UI
+# can then change this, upgrade plugins, etc.
+copy_reference_file() {
+ f=${1%/}
+ echo "$f"
+ rel=${f:23}
+ dir=$(dirname ${f})
+ echo " $f -> $rel"
+ if [[ ! -e /var/jenkins_home/${rel} ]]
+ then
+ echo "copy $rel to JENKINS_HOME"
+ mkdir -p /var/jenkins_home/${dir:23}
+ cp -r /usr/share/jenkins/ref/${rel} /var/jenkins_home/${rel};
+ fi;
+}
+export -f copy_reference_file
+find /usr/share/jenkins/ref/ -type f -exec bash -c 'copy_reference_file {}' \;
+
+# if `docker run` first argument start with `--` the user is passing jenkins launcher arguments
+if [[ $# -lt 1 ]] || [[ "$1" == "--"* ]]; then
+ exec java $JAVA_OPTS -jar /usr/share/jenkins/jenkins.war $JENKINS_OPTS "$@"
+fi
+
+# As argument is not jenkins, assume user want to run his own process, for sample a `bash` shell to explore this image
+exec "$@"
+
diff --git a/1.591/plugins.sh b/1.591/plugins.sh
new file mode 100755
index 0000000..e0df32b
--- /dev/null
+++ b/1.591/plugins.sh
@@ -0,0 +1,17 @@
+#! /bin/bash
+
+# Parse a support-core plugin -style txt file as specification for jenkins plugins to be installed
+# in the reference directory, so user can define a derived Docker image with just :
+#
+# FROM jenkins
+# COPY plugins.txt /plugins.txt
+# RUN /usr/share/jenkins/plugins.sh /plugins.txt
+#
+
+REF=/usr/share/jenkins/ref/plugins
+mkdir -p $REF
+
+while read spec; do
+ plugin=(${spec//:/ });
+ curl -L ${JENKINS_UC}/download/plugins/${plugin[0]}/${plugin[1]}/${plugin[0]}.hpi -o $REF/${plugin[0]}.hpi;
+done < $1
diff --git a/1.592/Dockerfile b/1.592/Dockerfile
new file mode 100644
index 0000000..a91431b
--- /dev/null
+++ b/1.592/Dockerfile
@@ -0,0 +1,45 @@
+FROM java:openjdk-7u65-jdk
+
+RUN apt-get update && apt-get install -y wget git curl zip && rm -rf /var/lib/apt/lists/*
+
+ENV JENKINS_HOME /var/jenkins_home
+
+# Jenkins is ran with user `jenkins`, uid = 1000
+# If you bind mount a volume from host/vloume from a data container,
+# ensure you use same uid
+RUN useradd -d "$JENKINS_HOME" -u 1000 -m -s /bin/bash jenkins
+
+# Jenkins home directoy is a volume, so configuration and build history
+# can be persisted and survive image upgrades
+VOLUME /var/jenkins_home
+
+# `/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
+
+
+COPY init.groovy /usr/share/jenkins/ref/init.groovy.d/tcp-slave-angent-port.groovy
+
+ENV JENKINS_VERSION 1.592
+
+# could use ADD but this one does not check Last-Modified header
+# see https://github.com/docker/docker/issues/8331
+RUN curl -L http://mirrors.jenkins-ci.org/war-stable/$JENKINS_VERSION/jenkins.war -o /usr/share/jenkins/jenkins.war
+
+ENV JENKINS_UC https://updates.jenkins-ci.org
+RUN chown -R jenkins "$JENKINS_HOME" /usr/share/jenkins/ref
+
+# for main web interface:
+EXPOSE 8080
+
+# will be used by attached slave agents:
+EXPOSE 50000
+
+USER jenkins
+
+COPY jenkins.sh /usr/local/bin/jenkins.sh
+ENTRYPOINT ["/usr/local/bin/jenkins.sh"]
+
+# from a derived Dockerfile, can use `RUN plugin.sh active.txt` to setup /usr/share/jenkins/ref/plugins from a support bundle
+COPY plugins.sh /usr/local/bin/plugins.sh
diff --git a/1.592/init.groovy b/1.592/init.groovy
new file mode 100644
index 0000000..83c3a3d
--- /dev/null
+++ b/1.592/init.groovy
@@ -0,0 +1,9 @@
+import hudson.model.*;
+import jenkins.model.*;
+
+
+Thread.start {
+ sleep 10000
+ println "--> setting agent port for jnlp"
+ Jenkins.instance.setSlaveAgentPort(50000)
+}
diff --git a/1.592/jenkins.sh b/1.592/jenkins.sh
new file mode 100755
index 0000000..1bd0f85
--- /dev/null
+++ b/1.592/jenkins.sh
@@ -0,0 +1,30 @@
+#! /bin/bash
+
+# Copy files from /usr/share/jenkins/ref into /var/jenkins_home
+# So the initial JENKINS-HOME is set with expected content.
+# Don't override, as this is just a reference setup, and use from UI
+# can then change this, upgrade plugins, etc.
+copy_reference_file() {
+ f=${1%/}
+ echo "$f"
+ rel=${f:23}
+ dir=$(dirname ${f})
+ echo " $f -> $rel"
+ if [[ ! -e /var/jenkins_home/${rel} ]]
+ then
+ echo "copy $rel to JENKINS_HOME"
+ mkdir -p /var/jenkins_home/${dir:23}
+ cp -r /usr/share/jenkins/ref/${rel} /var/jenkins_home/${rel};
+ fi;
+}
+export -f copy_reference_file
+find /usr/share/jenkins/ref/ -type f -exec bash -c 'copy_reference_file {}' \;
+
+# if `docker run` first argument start with `--` the user is passing jenkins launcher arguments
+if [[ $# -lt 1 ]] || [[ "$1" == "--"* ]]; then
+ exec java $JAVA_OPTS -jar /usr/share/jenkins/jenkins.war $JENKINS_OPTS "$@"
+fi
+
+# As argument is not jenkins, assume user want to run his own process, for sample a `bash` shell to explore this image
+exec "$@"
+
diff --git a/1.592/plugins.sh b/1.592/plugins.sh
new file mode 100755
index 0000000..e0df32b
--- /dev/null
+++ b/1.592/plugins.sh
@@ -0,0 +1,17 @@
+#! /bin/bash
+
+# Parse a support-core plugin -style txt file as specification for jenkins plugins to be installed
+# in the reference directory, so user can define a derived Docker image with just :
+#
+# FROM jenkins
+# COPY plugins.txt /plugins.txt
+# RUN /usr/share/jenkins/plugins.sh /plugins.txt
+#
+
+REF=/usr/share/jenkins/ref/plugins
+mkdir -p $REF
+
+while read spec; do
+ plugin=(${spec//:/ });
+ curl -L ${JENKINS_UC}/download/plugins/${plugin[0]}/${plugin[1]}/${plugin[0]}.hpi -o $REF/${plugin[0]}.hpi;
+done < $1