@@ -101,18 +101,17 @@ RUN curl -fsSL "https://github.com/krallin/tini/releases/download/${TINI_VERSION
101101ARG JENKINS_VERSION
102102ENV JENKINS_VERSION=${JENKINS_VERSION:-2.547}
103103
104- # jenkins.war checksum, download will be validated using it
105- ARG WAR_SHA=ef0301ce35bff7ead76201a8202acad6338568f0832666a2672831b260e08088
106-
107104# Can be used to customize where jenkins.war get downloaded from
108105ARG WAR_URL=https://get.jenkins.io/war/${JENKINS_VERSION}/jenkins.war
106+ COPY jenkins.io-2026.key /tmp/jenkins-key.pub
109107
110- # could use ADD but this one does not check Last-Modified header neither does it allow to control checksum
108+ # could use ADD but this one does not check Last-Modified header
111109# see https://github.com/docker/docker/issues/8331
112- RUN curl -fsSL ${WAR_URL} -o /usr/share/jenkins/jenkins.war \
113- && echo "${WAR_SHA} /usr/share/jenkins/jenkins.war" >/tmp/war_sha \
114- && sha256sum -c --strict /tmp/war_sha \
115- && rm -f /tmp/war_sha
110+ RUN curl -fsSL "${WAR_URL}" -o /usr/share/jenkins/jenkins.war \
111+ && curl -fsSL "${WAR_URL}.asc" -o /tmp/jenkins.war.asc \
112+ && gpg --import /tmp/jenkins-key.pub \
113+ && gpg --verify --trust-model direct /tmp/jenkins.war.asc /usr/share/jenkins/jenkins.war \
114+ && rm -f /tmp/*
116115
117116ENV JENKINS_UC=https://updates.jenkins.io
118117ENV JENKINS_UC_EXPERIMENTAL=https://updates.jenkins.io/experimental
@@ -122,9 +121,9 @@ RUN chown -R ${user} "$JENKINS_HOME" "$REF"
122121ARG PLUGIN_CLI_VERSION=2.13.2
123122ARG PLUGIN_CLI_URL=https://github.com/jenkinsci/plugin-installation-manager-tool/releases/download/${PLUGIN_CLI_VERSION}/jenkins-plugin-manager-${PLUGIN_CLI_VERSION}.jar
124123RUN curl -fsSL ${PLUGIN_CLI_URL} -o /opt/jenkins-plugin-manager.jar \
125- && echo "$(curl -fsSL " ${PLUGIN_CLI_URL}.sha256") /opt/jenkins-plugin-manager.jar" >/tmp/war_sha \
126- && sha256sum -c --strict /tmp/war_sha \
127- && rm -f /tmp/war_sha
124+ && echo "$(curl -fsSL " ${PLUGIN_CLI_URL}.sha256") /opt/jenkins-plugin-manager.jar" >/tmp/jpm_sha \
125+ && sha256sum -c --strict /tmp/jpm_sha \
126+ && rm -f /tmp/jpm_sha
128127
129128# for main web interface:
130129EXPOSE ${http_port}
0 commit comments