Last active
December 22, 2015 04:58
-
-
Save obazoud/6420349 to your computer and use it in GitHub Desktop.
Build Docker images - Jenkins -
https://index.docker.io/u/obazoud/jenkins/
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Install Jenkins 1.529 on Ubuntu 12.10 | |
# Build | |
# sudo docker run -p 8080:8080 -i -t obazoud/jenkins /bin/bash | |
# Install | |
# sudo docker pull obazoud/jenkins | |
# Use | |
# cd /opt && java -jar jenkins.war | |
# open http://127.0.0.1:8080 | |
FROM ubuntu:12.10 | |
MAINTAINER Bazoud Olivier version: 0.1 | |
RUN apt-get update | |
# install packages | |
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y openjdk-6-jdk curl git-core build-essential | |
# env stuff | |
ENV JENKINS_HOME /data/jenkins | |
ENV JENKINS_VERSION 1.529 | |
ENV PATH /opt/go/bin:/root/gocode/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin | |
#ENV HOSTNAME "$(hostname)" | |
# workaround to be able to resolve localhost from within Java | |
RUN sed -i "s/^127.0.0.1/127.0.0.1 $(hostname) /" /etc/hosts | |
# install jenkins | |
RUN curl -o /opt/jenkins.war -L http://mirrors.jenkins-ci.org/war/${JENKINS_VERSION}/jenkins.war | |
# Run jenkins | |
EXPOSE 8080 | |
CMD cd /opt && java -jar jenkins.war |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment