Skip to content

Commit

Permalink
Resolved hadolint build issues
Browse files Browse the repository at this point in the history
  • Loading branch information
ilolm committed Nov 9, 2024
1 parent c2eb3f8 commit d4907ca
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 18 deletions.
18 changes: 9 additions & 9 deletions debian/bookworm-slim/hotspot/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -134,17 +134,17 @@ ENV JENKINS_HOME=$JENKINS_HOME \
# If you bind mount a volume from the host or a data container, #
# ensure you use the same uid(e.g. 1000) #
#---------------------------------------------------------------#
RUN mkdir -p $JENKINS_HOME \
&& chown ${uid}:${gid} $JENKINS_HOME \
&& groupadd -g ${gid} ${group} \
&& useradd -d "$JENKINS_HOME" -u ${uid} -g ${gid} -l -m -s /bin/bash ${user}
RUN mkdir -p "$JENKINS_HOME" \
&& chown "${uid}":"${gid}" "$JENKINS_HOME" \
&& groupadd -g "${gid}" "${group}" \
&& useradd -d "$JENKINS_HOME" -u "${uid}" -g "${gid}" -l -m -s /bin/bash ${user}

#-----------------------------------------------------------------------------------#
# $REF (defaults to `/usr/share/jenkins/ref/`) contains all reference configuration #
# we want to set on a fresh new installation. Use it to bundle additional plugins #
# or config file with your custom jenkins Docker image. #
#-----------------------------------------------------------------------------------#
RUN mkdir -p ${REF}/init.groovy.d
RUN mkdir -p "${REF}"/init.groovy.d

#------------------------------------------------------------------------#
# JENKINS_SHA: jenkins.war checksum, download will be validated using it #
Expand All @@ -158,20 +158,20 @@ ARG JENKINS_SHA=910ea36cef37c45087e39d65e335988e036fccea47c79cc5a52e721a10cb1b49
# could use ADD but this one does not check Last-Modified header neither does it allow to control checksum #
# see https://github.com/docker/docker/issues/8331 #
#----------------------------------------------------------------------------------------------------------#
RUN curl -fsSL ${JENKINS_URL} -o /usr/share/jenkins/jenkins.war \
RUN curl -fsSL "${JENKINS_URL}" -o /usr/share/jenkins/jenkins.war \
&& echo "${JENKINS_SHA} /usr/share/jenkins/jenkins.war" >/tmp/jenkins_sha \
&& sha256sum -c --strict /tmp/jenkins_sha \
&& rm -f /tmp/jenkins_sha

ENV JENKINS_UC=https://updates.jenkins.io \
JENKINS_UC_EXPERIMENTAL=https://updates.jenkins.io/experimental \
JENKINS_INCREMENTALS_REPO_MIRROR=https://repo.jenkins-ci.org/incrementals
RUN chown -R ${user} "$JENKINS_HOME" "$REF"
RUN chown -R "${user}" "$JENKINS_HOME" "$REF"

ARG PLUGIN_CLI_VERSION=2.13.2 \
PLUGIN_CLI_URL=https://github.com/jenkinsci/plugin-installation-manager-tool/releases/download/${PLUGIN_CLI_VERSION}/jenkins-plugin-manager-${PLUGIN_CLI_VERSION}.jar
RUN curl -fsSL ${PLUGIN_CLI_URL} -o /opt/jenkins-plugin-manager.jar \
&& echo "$(curl -fsSL "${PLUGIN_CLI_URL}.sha256") /opt/jenkins-plugin-manager.jar" >/tmp/jenkins_sha \
RUN curl -fsSL "${PLUGIN_CLI_URL}" -o /opt/jenkins-plugin-manager.jar \
&& echo "$(curl -fsSL ${PLUGIN_CLI_URL}.sha256) /opt/jenkins-plugin-manager.jar" >/tmp/jenkins_sha \
&& sha256sum -c --strict /tmp/jenkins_sha \
&& rm -f /tmp/jenkins_sha

Expand Down
18 changes: 9 additions & 9 deletions debian/bookworm/hotspot/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -134,17 +134,17 @@ ENV JENKINS_HOME=$JENKINS_HOME \
# If you bind mount a volume from the host or a data container, #
# ensure you use the same uid(e.g. 1000) #
#---------------------------------------------------------------#
RUN mkdir -p $JENKINS_HOME \
&& chown ${uid}:${gid} $JENKINS_HOME \
&& groupadd -g ${gid} ${group} \
&& useradd -d "$JENKINS_HOME" -u ${uid} -g ${gid} -l -m -s /bin/bash ${user}
RUN mkdir -p "$JENKINS_HOME" \
&& chown "${uid}":"${gid}" "$JENKINS_HOME" \
&& groupadd -g "${gid}" "${group}" \
&& useradd -d "$JENKINS_HOME" -u "${uid}" -g "${gid}" -l -m -s /bin/bash ${user}

#-----------------------------------------------------------------------------------#
# $REF (defaults to `/usr/share/jenkins/ref/`) contains all reference configuration #
# we want to set on a fresh new installation. Use it to bundle additional plugins #
# or config file with your custom jenkins Docker image. #
#-----------------------------------------------------------------------------------#
RUN mkdir -p ${REF}/init.groovy.d
RUN mkdir -p "${REF}"/init.groovy.d

#------------------------------------------------------------------------#
# JENKINS_SHA: jenkins.war checksum, download will be validated using it #
Expand All @@ -158,20 +158,20 @@ ARG JENKINS_SHA=910ea36cef37c45087e39d65e335988e036fccea47c79cc5a52e721a10cb1b49
# could use ADD but this one does not check Last-Modified header neither does it allow to control checksum #
# see https://github.com/docker/docker/issues/8331 #
#----------------------------------------------------------------------------------------------------------#
RUN curl -fsSL ${JENKINS_URL} -o /usr/share/jenkins/jenkins.war \
RUN curl -fsSL "${JENKINS_URL}" -o /usr/share/jenkins/jenkins.war \
&& echo "${JENKINS_SHA} /usr/share/jenkins/jenkins.war" >/tmp/jenkins_sha \
&& sha256sum -c --strict /tmp/jenkins_sha \
&& rm -f /tmp/jenkins_sha

ENV JENKINS_UC=https://updates.jenkins.io \
JENKINS_UC_EXPERIMENTAL=https://updates.jenkins.io/experimental \
JENKINS_INCREMENTALS_REPO_MIRROR=https://repo.jenkins-ci.org/incrementals
RUN chown -R ${user} "$JENKINS_HOME" "$REF"
RUN chown -R "${user}" "$JENKINS_HOME" "$REF"

ARG PLUGIN_CLI_VERSION=2.13.2 \
PLUGIN_CLI_URL=https://github.com/jenkinsci/plugin-installation-manager-tool/releases/download/${PLUGIN_CLI_VERSION}/jenkins-plugin-manager-${PLUGIN_CLI_VERSION}.jar
RUN curl -fsSL ${PLUGIN_CLI_URL} -o /opt/jenkins-plugin-manager.jar \
&& echo "$(curl -fsSL "${PLUGIN_CLI_URL}.sha256") /opt/jenkins-plugin-manager.jar" >/tmp/jenkins_sha \
RUN curl -fsSL "${PLUGIN_CLI_URL}" -o /opt/jenkins-plugin-manager.jar \
&& echo "$(curl -fsSL ${PLUGIN_CLI_URL}.sha256) /opt/jenkins-plugin-manager.jar" >/tmp/jenkins_sha \
&& sha256sum -c --strict /tmp/jenkins_sha \
&& rm -f /tmp/jenkins_sha

Expand Down

0 comments on commit d4907ca

Please sign in to comment.