Merge pull request #5 from aleasoluciones/upstream

Set jenkins user home to /var/jenkins_home
diff --git a/Dockerfile b/Dockerfile
index 57c0f32..bc5e364 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,10 +1,10 @@
 FROM ubuntu:14.04
 
-RUN echo "1.565.1" > .lts-version-number
+RUN echo "1.565.2" > .lts-version-number
 
-RUN apt-get update && apt-get install -y wget git curl zip
-RUN apt-get update && apt-get install -y --no-install-recommends openjdk-7-jdk
-RUN apt-get update && apt-get install -y maven ant ruby rbenv make
+RUN apt-get update && apt-get install -y wget git curl zip && apt-get clean
+RUN apt-get update && apt-get install -y --no-install-recommends openjdk-7-jdk && apt-get clean
+RUN apt-get update && apt-get install -y maven ant ruby rbenv make && apt-get clean
 
 RUN wget -q -O - http://pkg.jenkins-ci.org/debian-stable/jenkins-ci.org.key | sudo apt-key add -
 RUN echo deb http://pkg.jenkins-ci.org/debian-stable binary/ >> /etc/apt/sources.list
@@ -12,12 +12,13 @@
 RUN usermod -m -d /var/jenkins_home jenkins
 RUN mkdir -p /var/jenkins_home && chown -R jenkins /var/jenkins_home
 ADD init.groovy /tmp/WEB-INF/init.groovy
-RUN cd /tmp && zip -g /usr/share/jenkins/jenkins.war WEB-INF/init.groovy
+RUN cd /tmp && zip -g /usr/share/jenkins/jenkins.war WEB-INF/init.groovy && rm -rf /tmp/WEB-INF
 ADD ./jenkins.sh /usr/local/bin/jenkins.sh
 RUN chmod +x /usr/local/bin/jenkins.sh
 USER jenkins
 
 # VOLUME /var/jenkins_home - bind this in via -v if you want to make this persistent.
+VOLUME /var/jenkins_home
 ENV JENKINS_HOME /var/jenkins_home
 
 # define url prefix for running jenkins behind Apache (https://wiki.jenkins-ci.org/display/JENKINS/Running+Jenkins+behind+Apache)
diff --git a/README.md b/README.md
index 26fabad..5491f66 100644
--- a/README.md
+++ b/README.md
@@ -15,10 +15,10 @@
 docker run -p 8080:8080 jenkins
 ```
 
-This will store the workspace in /var/jenkins_home. All Jenkins data lives in there - including plugins and configuration. You will probably want to make that a persistent volume:
+This will store the workspace in /var/jenkins_home. All Jenkins data lives in there - including plugins and configuration. You will probably want to make that a persistent volume (recommended):
 
 ```
-docker run --name myjenkins -p 8080:8080 -v /var/jenkins_home jenkins
+docker run --name myjenkins -p 8080:8080 -v /your/home:/var/jenkins_home jenkins
 ```
 
 The volume for the "myjenkins" named container will then be persistent.
@@ -33,7 +33,7 @@
 
 ## Backing up data
 
-If you bind mount in a volume - you can simply back up that directory (which is jenkins_home) at any time. 
+If you bind mount in a volume - you can simply back up that directory (which is jenkins_home) at any time. This is highly recommended. Treat the jenkins_home directory as you would a database - in Docker you would generally put a database on a volume.
 
 If your volume is inside a container - you can use ```docker cp $ID:/var/jenkins_home``` command to extract the data.