forked from killercentury/docker-jenkins-slave-dind
-
Notifications
You must be signed in to change notification settings - Fork 40
/
Copy pathDockerfile
37 lines (30 loc) · 1.28 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
FROM docker:18.02
MAINTAINER Viktor Farcic <[email protected]>
ARG version="0.2.0"
ARG build_date="unknown"
ARG commit_hash="unknown"
ARG vcs_url="unknown"
ARG vcs_branch="unknown"
LABEL org.label-schema.vendor="vfarcic" \
org.label-schema.name="jenkins-swarm-agent" \
org.label-schema.description="Jenkins agent based on the Swarm plugin" \
org.label-schema.usage="/src/README.md" \
org.label-schema.url="https://github.com/vfarcic/docker-jenkins-slave-dind/blob/master/README.md" \
org.label-schema.vcs-url=$vcs_url \
org.label-schema.vcs-branch=$vcs_branch \
org.label-schema.vcs-ref=$commit_hash \
org.label-schema.version=$version \
org.label-schema.schema-version="1.0" \
org.label-schema.build-date=$build_date
ENV SWARM_CLIENT_VERSION="3.9" \
DOCKER_COMPOSE_VERSION="1.19.0" \
COMMAND_OPTIONS="" \
USER_NAME_SECRET="" \
PASSWORD_SECRET=""
RUN adduser -G root -D jenkins && \
apk --update --no-cache add openjdk8-jre python py-pip git git-lfs openssh ca-certificates openssl && \
wget -q https://repo.jenkins-ci.org/releases/org/jenkins-ci/plugins/swarm-client/${SWARM_CLIENT_VERSION}/swarm-client-${SWARM_CLIENT_VERSION}.jar -P /home/jenkins/ && \
pip install docker-compose
COPY run.sh /run.sh
RUN chmod +x /run.sh
CMD ["/run.sh"]