2016-01-30 23:35:25 +08:00
|
|
|
#
|
|
|
|
# Dockerfile for jenkins
|
|
|
|
#
|
|
|
|
|
|
|
|
FROM alpine
|
|
|
|
MAINTAINER kev <noreply@datageek.info>
|
|
|
|
|
|
|
|
ENV JENKINS_HOME /var/jenkins_home
|
|
|
|
|
|
|
|
RUN set -xe \
|
2016-01-31 02:17:42 +08:00
|
|
|
&& apk add -U curl \
|
|
|
|
openjdk8 \
|
|
|
|
openssh-client \
|
|
|
|
ttf-dejavu \
|
2016-01-30 23:35:25 +08:00
|
|
|
&& adduser -h $JENKINS_HOME -u 1000 -s /bin/sh -D jenkins \
|
2016-01-31 00:27:01 +08:00
|
|
|
&& mkdir -p /usr/share/jenkins \
|
2016-01-31 02:17:42 +08:00
|
|
|
&& cd /usr/share/jenkins \
|
|
|
|
&& wget http://mirrors.jenkins-ci.org/war/latest/jenkins.war \
|
2016-01-30 23:35:25 +08:00
|
|
|
&& rm -rf /var/cache/apk/*
|
|
|
|
|
|
|
|
VOLUME $JENKINS_HOME
|
|
|
|
WORKDIR $JENKINS_HOME
|
|
|
|
|
|
|
|
USER jenkins
|
|
|
|
|
|
|
|
EXPOSE 8080
|
|
|
|
|
2016-01-31 00:27:01 +08:00
|
|
|
CMD ["java", "-Djava.awt.headless=true", "-jar", "/usr/share/jenkins/jenkins.war"]
|