-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
39 lines (30 loc) · 1.12 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
FROM jtilander/alpine
MAINTAINER Jim Tilander
RUN apk add --no-cache \
openjdk8 \
curl \
git \
make \
docker
ENV SWARM_VERSION=3.4 \
GOSU_VERSION=1.10
RUN curl --create-dirs -sSLo /usr/share/jenkins/swarm-client-${SWARM_VERSION}.jar https://repo.jenkins-ci.org/releases/org/jenkins-ci/plugins/swarm-client/${SWARM_VERSION}/swarm-client-${SWARM_VERSION}.jar \
&& chmod 755 /usr/share/jenkins
RUN curl -SsL https://github.com/tianon/gosu/releases/download/${GOSU_VERSION}/gosu-amd64 > /sbin/gosu && chmod a+x /sbin/gosu
ENV MYHOME=/home/jenkins \
UID=999
RUN adduser -S -D -u $UID jenkins && \
mkdir -p $MYHOME && chmod g+rwx $MYHOME
ENV JENKINS_MEMORY=200M
ENV SWARM_MASTER=http://jenkins:8080
ENV SWARM_EXECUTORS=1
ENV SWARM_USERNAME=
ENV SWARM_PASSWORD=password
ENV SWARM_LABELS="docker linux swarm amd64"
ENV MYTIMEZONE="America/Los_Angeles"
ENV JAVA_OPTS="-Xms$JENKINS_MEMORY -Xmx$JENKINS_MEMORY -Djava.awt.headless=true -Duser.timezone=$MYTIMEZONE -Dorg.apache.commons.jelly.tags.fmt.timeZone=$MYTIMEZONE"
WORKDIR $MYHOME
VOLUME ["$MYHOME"]
COPY docker-entrypoint.sh /
ENTRYPOINT ["/docker-entrypoint.sh"]
CMD ["swarm"]