Skip to content

Commit

Permalink
Moving to LTS by default
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelneale committed Jul 18, 2014
1 parent 711e12e commit 3e124ed
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 26 deletions.
17 changes: 11 additions & 6 deletions Dockerfile
Expand Up @@ -2,17 +2,22 @@ FROM ubuntu:14.04

RUN apt-get update && apt-get install -y wget git curl
RUN apt-get update && apt-get install -y --no-install-recommends openjdk-7-jdk
RUN apt-get update && apt-get install -y maven ant
RUN wget -q -O - http://pkg.jenkins-ci.org/debian/jenkins-ci.org.key | sudo apt-key add -
RUN echo deb http://pkg.jenkins-ci.org/debian binary/ >> /etc/apt/sources.list
RUN apt-get update && apt-get install -y maven ant ruby rbenv make
RUN echo "1.554.3" > .lts-version-number
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
RUN apt-get update && apt-get install -y jenkins
RUN mkdir -p /var/jenkins_home && chown -R jenkins /var/jenkins_home
ADD init.groovy /tmp/WEB-INF/init.groovy
RUN apt-get install -y zip && cd /tmp && zip -g /usr/share/jenkins/jenkins.war WEB-INF/init.groovy
USER jenkins

# VOLUME /var/jenkins_home
# VOLUME /var/jenkins_home - bind this in via -v if you want to make this persistent.
ENV JENKINS_HOME /var/jenkins_home
EXPOSE 8080
EXPOSE 50000

# for main web interface:
EXPOSE 8080

# will be used by attached slave agents:
EXPOSE 50000
CMD ["/usr/bin/java", "-jar", "/usr/share/jenkins/jenkins.war"]
26 changes: 21 additions & 5 deletions README.md
@@ -1,12 +1,13 @@
# This is a WIP
# Official Jenkins Docker image

The Jenkins Continuous Integration and Continuous Delivery server.
The Jenkins Continuous Integration and Delivery server.

This is a fully functional Jenkins server.
This is a fully functional Jenkins server, based on the Long Term Support release
http://jenkins-ci.org/

Note you can run builds on the master (out of the box) buf if you want to attach build slave servers: make sure you map the port: ```-p 50000:50000```.

To run:

# Usage

```
docker run -p 8080:8080 jenkins
Expand All @@ -28,5 +29,20 @@ First, ensure that /your/home is accessible by the jenkins user in container (je
docker run -p 8080:8080 -v /your/home:/var/jenkins_home jenkins
```

## 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 your volume is inside a container - you can use ```docker cp $ID:/var/jenkins_home``` command to extract the data.

# Attaching build executors

You can run builds on the master (out of the box) buf if you want to attach build slave servers: make sure you map the port: ```-p 50000:50000``` - which will be used when you connect a slave agent.


# Upgrading

All the data needed is in the /var/jenkins_home directory - so depending on how you manage that - depends on how you upgrade. Generally - you can copy it out - and then "docker pull" the image again - and you will have the latest LTS - you can then start up with -v pointing to that data (/var/jenkins_home) and everything will be as you left it.



15 changes: 0 additions & 15 deletions lts/Dockerfile

This file was deleted.

0 comments on commit 3e124ed

Please sign in to comment.