Use add instead of wget to download things for gerrit images

The jitsi image showed you can ADD a url. Instead of installing wget
into the images and wgetting in a shell, use ADD. Presumably this
will help docker cache things better?

Change-Id: I7bc92952804c1257fc6569e3847d898ab2385eeb
This commit is contained in:
Clark Boylan 2022-03-16 10:49:49 -07:00
parent 0525c5d896
commit 1f0948be99

View File

@ -25,8 +25,7 @@ FROM docker.io/library/openjdk:11-bullseye as gerrit-base
RUN echo 'APT::Install-Recommends "0";' > /etc/apt/apt.conf.d/95disable-recommends
RUN apt-get update \
&& apt-get install -y dumb-init python3-launchpadlib python3-distutils \
wget unzip \
&& apt-get install -y dumb-init python3-launchpadlib python3-distutils unzip \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* \
&& curl https://bootstrap.pypa.io/get-pip.py > /tmp/get-pip.py \
@ -60,8 +59,9 @@ RUN mkdir /var/gerrit/bin \
# Download mariadb java client.
# Modern gerrit stopped downloading missing libs during init which means we
# need to do the downland and install ourselves.
RUN mkdir /var/gerrit/lib && \
wget https://repo1.maven.org/maven2/org/mariadb/jdbc/mariadb-java-client/2.7.2/mariadb-java-client-2.7.2.jar -O /var/gerrit/lib/mariadb-java-client.jar
# Note the perms on this are 0600 hence the need for the chown otherwise
# they are root owned and Gerrit can't use the jdbc driver.
ADD --chown=gerrit:gerrit https://repo1.maven.org/maven2/org/mariadb/jdbc/mariadb-java-client/2.7.2/mariadb-java-client-2.7.2.jar /var/gerrit/lib/mariadb-java-client.jar
# Allow incoming traffic
# OpenDev Gerrit listens on 8081 not default of 8080