Skip to content
This repository was archived by the owner on Oct 15, 2025. It is now read-only.

Commit 32eefe6

Browse files
authored
Merge pull request jenkinsci#579 from carlossg/arch
Enable multiarch builds
2 parents e3d4632 + 84b15d9 commit 32eefe6

File tree

3 files changed

+19
-22
lines changed

3 files changed

+19
-22
lines changed

Dockerfile

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,14 @@ VOLUME /var/jenkins_home
2727
# or config file with your custom jenkins Docker image.
2828
RUN mkdir -p /usr/share/jenkins/ref/init.groovy.d
2929

30-
ENV TINI_VERSION 0.14.0
31-
ENV TINI_SHA 6c41ec7d33e857d4779f14d9c74924cab0c7973485d2972419a3b7c7620ff5fd
32-
3330
# Use tini as subreaper in Docker container to adopt zombie processes
34-
RUN curl -fsSL https://github.com/krallin/tini/releases/download/v${TINI_VERSION}/tini-static-amd64 -o /bin/tini && chmod +x /bin/tini \
35-
&& echo "$TINI_SHA /bin/tini" | sha256sum -c -
31+
ARG TINI_VERSION=v0.14.0
32+
RUN curl -fsSL https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini-static-$(dpkg --print-architecture) -o /sbin/tini \
33+
&& curl -fsSL https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini-static-$(dpkg --print-architecture).asc -o /sbin/tini.asc \
34+
&& gpg --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 595E85A6B1B4779EA4DAAEC70B588DFF0527A9B7 \
35+
&& gpg --verify /sbin/tini.asc \
36+
&& rm -rf /sbin/tini.asc /root/.gnupg \
37+
&& chmod +x /sbin/tini
3638

3739
COPY init.groovy /usr/share/jenkins/ref/init.groovy.d/tcp-slave-agent-port.groovy
3840

@@ -67,7 +69,7 @@ USER ${user}
6769

6870
COPY jenkins-support /usr/local/bin/jenkins-support
6971
COPY jenkins.sh /usr/local/bin/jenkins.sh
70-
ENTRYPOINT ["/bin/tini", "--", "/usr/local/bin/jenkins.sh"]
72+
ENTRYPOINT ["/sbin/tini", "--", "/usr/local/bin/jenkins.sh"]
7173

7274
# from a derived Dockerfile, can use `RUN plugins.sh active.txt` to setup /usr/share/jenkins/ref/plugins from a support bundle
7375
COPY plugins.sh /usr/local/bin/plugins.sh

Dockerfile-alpine

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
FROM openjdk:8-jdk-alpine
22

3-
RUN apk add --no-cache git openssh-client curl unzip bash ttf-dejavu coreutils
3+
RUN apk add --no-cache git openssh-client curl unzip bash ttf-dejavu coreutils tini
44

55
ARG user=jenkins
66
ARG group=jenkins
@@ -27,13 +27,6 @@ VOLUME /var/jenkins_home
2727
# or config file with your custom jenkins Docker image.
2828
RUN mkdir -p /usr/share/jenkins/ref/init.groovy.d
2929

30-
ENV TINI_VERSION 0.14.0
31-
ENV TINI_SHA 6c41ec7d33e857d4779f14d9c74924cab0c7973485d2972419a3b7c7620ff5fd
32-
33-
# Use tini as subreaper in Docker container to adopt zombie processes
34-
RUN curl -fsSL https://github.com/krallin/tini/releases/download/v${TINI_VERSION}/tini-static-amd64 -o /bin/tini && chmod +x /bin/tini \
35-
&& echo "$TINI_SHA /bin/tini" | sha256sum -c -
36-
3730
COPY init.groovy /usr/share/jenkins/ref/init.groovy.d/tcp-slave-agent-port.groovy
3831

3932
# jenkins version being bundled in this docker image
@@ -67,7 +60,7 @@ USER ${user}
6760

6861
COPY jenkins-support /usr/local/bin/jenkins-support
6962
COPY jenkins.sh /usr/local/bin/jenkins.sh
70-
ENTRYPOINT ["/bin/tini", "--", "/usr/local/bin/jenkins.sh"]
63+
ENTRYPOINT ["/sbin/tini", "--", "/usr/local/bin/jenkins.sh"]
7164

7265
# from a derived Dockerfile, can use `RUN plugins.sh active.txt` to setup /usr/share/jenkins/ref/plugins from a support bundle
7366
COPY plugins.sh /usr/local/bin/plugins.sh

Dockerfile-slim

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
FROM openjdk:8-jdk-slim
22

3-
RUN apt-get update && apt-get install -y git curl && rm -rf /var/lib/apt/lists/*
3+
RUN apt-get update && apt-get install -y git curl gpg && rm -rf /var/lib/apt/lists/*
44

55
ARG user=jenkins
66
ARG group=jenkins
@@ -27,12 +27,14 @@ VOLUME /var/jenkins_home
2727
# or config file with your custom jenkins Docker image.
2828
RUN mkdir -p /usr/share/jenkins/ref/init.groovy.d
2929

30-
ENV TINI_VERSION 0.14.0
31-
ENV TINI_SHA 6c41ec7d33e857d4779f14d9c74924cab0c7973485d2972419a3b7c7620ff5fd
32-
3330
# Use tini as subreaper in Docker container to adopt zombie processes
34-
RUN curl -fsSL https://github.com/krallin/tini/releases/download/v${TINI_VERSION}/tini-static-amd64 -o /bin/tini && chmod +x /bin/tini \
35-
&& echo "$TINI_SHA /bin/tini" | sha256sum -c -
31+
ARG TINI_VERSION=v0.14.0
32+
RUN curl -fsSL https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini-static-$(dpkg --print-architecture) -o /sbin/tini \
33+
&& curl -fsSL https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini-static-$(dpkg --print-architecture).asc -o /sbin/tini.asc \
34+
&& gpg --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 595E85A6B1B4779EA4DAAEC70B588DFF0527A9B7 \
35+
&& gpg --verify /sbin/tini.asc \
36+
&& rm -rf /sbin/tini.asc /root/.gnupg \
37+
&& chmod +x /sbin/tini
3638

3739
COPY init.groovy /usr/share/jenkins/ref/init.groovy.d/tcp-slave-agent-port.groovy
3840

@@ -67,7 +69,7 @@ USER ${user}
6769

6870
COPY jenkins-support /usr/local/bin/jenkins-support
6971
COPY jenkins.sh /usr/local/bin/jenkins.sh
70-
ENTRYPOINT ["/bin/tini", "--", "/usr/local/bin/jenkins.sh"]
72+
ENTRYPOINT ["/sbin/tini", "--", "/usr/local/bin/jenkins.sh"]
7173

7274
# from a derived Dockerfile, can use `RUN plugins.sh active.txt` to setup /usr/share/jenkins/ref/plugins from a support bundle
7375
COPY plugins.sh /usr/local/bin/plugins.sh

0 commit comments

Comments
 (0)