Skip to content

Commit be1da0e

Browse files
authored
misc: cleanup Dockerfiles
* Cleanup: Use spaces instead of tabulation * Cleanup: Reduce layers * Cleanup: Homogeneise wget syntax * Cleanup: Use binary GPG key format
1 parent 09cf0a8 commit be1da0e

File tree

8 files changed

+82
-107
lines changed

8 files changed

+82
-107
lines changed

base-java/Dockerfile

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,9 @@ ARG JITSI_REPO=jitsi
22
ARG BASE_TAG=latest
33
FROM ${JITSI_REPO}/base:${BASE_TAG}
44

5-
RUN \
6-
mkdir -p /usr/share/man/man1 && \
7-
wget -q https://adoptopenjdk.jfrog.io/adoptopenjdk/api/gpg/key/public -O /etc/apt/trusted.gpg.d/openjdk.asc && \
8-
echo "deb https://adoptopenjdk.jfrog.io/adoptopenjdk/deb/ buster main" > /etc/apt/sources.list.d/openjdk.list && \
9-
apt-dpkg-wrap apt-get update && \
10-
apt-dpkg-wrap apt-get install -y adoptopenjdk-8-hotspot-jre && \
11-
apt-cleanup
5+
RUN mkdir -p /usr/share/man/man1 && \
6+
wget -qO - https://adoptopenjdk.jfrog.io/adoptopenjdk/api/gpg/key/public | gpg --dearmour > /etc/apt/trusted.gpg.d/openjdk.gpg && \
7+
echo "deb https://adoptopenjdk.jfrog.io/adoptopenjdk/deb/ buster main" > /etc/apt/sources.list.d/openjdk.list && \
8+
apt-dpkg-wrap apt-get update && \
9+
apt-dpkg-wrap apt-get install -y adoptopenjdk-8-hotspot-jre && \
10+
apt-cleanup

base/Dockerfile

Lines changed: 16 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -7,24 +7,22 @@ ENV S6_BEHAVIOUR_IF_STAGE2_FAILS=2
77

88
COPY rootfs /
99

10-
RUN \
11-
apt-dpkg-wrap apt-get update && \
12-
apt-dpkg-wrap apt-get install -y apt-transport-https apt-utils ca-certificates gnupg wget && \
13-
wget -qO - https://github.com/just-containers/s6-overlay/releases/download/v1.22.1.0/s6-overlay-amd64.tar.gz | tar xfz - -C / && \
14-
wget -qO - https://download.jitsi.org/jitsi-key.gpg.key -O /etc/apt/trusted.gpg.d/jitsi.asc && \
15-
wget -q https://github.com/subchen/frep/releases/download/v$FREP_VERSION/frep-$FREP_VERSION-linux-amd64 -O /usr/bin/frep && \
16-
echo "deb https://download.jitsi.org $JITSI_RELEASE/" > /etc/apt/sources.list.d/jitsi.list && \
17-
echo "deb http://ftp.debian.org/debian buster-backports main" > /etc/apt/sources.list.d/backports.list && \
18-
apt-dpkg-wrap apt-get update && \
19-
apt-dpkg-wrap apt-get dist-upgrade -y && \
20-
apt-cleanup && \
21-
chmod +x /usr/bin/frep
10+
RUN apt-dpkg-wrap apt-get update && \
11+
apt-dpkg-wrap apt-get install -y apt-transport-https apt-utils ca-certificates gnupg wget && \
12+
wget -qO - https://github.com/just-containers/s6-overlay/releases/download/v1.22.1.0/s6-overlay-amd64.tar.gz | tar xfz - -C / && \
13+
wget -qO - https://download.jitsi.org/jitsi-key.gpg.key | gpg --dearmour > /etc/apt/trusted.gpg.d/jitsi.gpg && \
14+
wget -qO /usr/bin/frep https://github.com/subchen/frep/releases/download/v$FREP_VERSION/frep-$FREP_VERSION-linux-amd64 && \
15+
echo "deb https://download.jitsi.org $JITSI_RELEASE/" > /etc/apt/sources.list.d/jitsi.list && \
16+
echo "deb http://ftp.debian.org/debian buster-backports main" > /etc/apt/sources.list.d/backports.list && \
17+
apt-dpkg-wrap apt-get update && \
18+
apt-dpkg-wrap apt-get dist-upgrade -y && \
19+
apt-cleanup && \
20+
chmod +x /usr/bin/frep
2221

23-
RUN \
24-
[ "$JITSI_RELEASE" = "unstable" ] && \
25-
apt-dpkg-wrap apt-get update && \
26-
apt-dpkg-wrap apt-get install -y jq procps curl vim iputils-ping net-tools && \
27-
apt-cleanup || \
28-
true
22+
RUN [ "$JITSI_RELEASE" = "unstable" ] && \
23+
apt-dpkg-wrap apt-get update && \
24+
apt-dpkg-wrap apt-get install -y jq procps curl vim iputils-ping net-tools && \
25+
apt-cleanup || \
26+
true
2927

3028
ENTRYPOINT [ "/init" ]

jibri/Dockerfile

Lines changed: 24 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -9,43 +9,31 @@ ARG CHROMEDRIVER_MAJOR_RELEASE=90
99

1010
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
1111

12-
RUN \
13-
apt-dpkg-wrap apt-get update \
14-
&& apt-dpkg-wrap apt-get install -y jibri libgl1-mesa-dri procps \
15-
&& apt-cleanup
16-
17-
RUN \
18-
[ "${CHROME_RELEASE}" = "latest" ] \
19-
&& wget -q https://dl-ssl.google.com/linux/linux_signing_key.pub -O /etc/apt/trusted.gpg.d/google.asc \
20-
&& echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" > /etc/apt/sources.list.d/google-chrome.list \
21-
&& apt-dpkg-wrap apt-get update \
22-
&& apt-dpkg-wrap apt-get install -y google-chrome-stable \
23-
&& apt-cleanup \
24-
|| true
25-
26-
RUN \
27-
[ "${CHROME_RELEASE}" != "latest" ] \
28-
&& curl -4so "/tmp/google-chrome-stable_${CHROME_RELEASE}-1_amd64.deb" "http://dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable/google-chrome-stable_${CHROME_RELEASE}-1_amd64.deb" \
29-
&& apt-dpkg-wrap apt-get update \
30-
&& apt-dpkg-wrap apt-get install -y "/tmp/google-chrome-stable_${CHROME_RELEASE}-1_amd64.deb" \
31-
&& apt-cleanup \
32-
|| true
33-
34-
RUN \
35-
[ "${CHROMEDRIVER_MAJOR_RELEASE}" = "latest" ] \
36-
&& CHROMEDRIVER_RELEASE="$(curl -4Ls https://chromedriver.storage.googleapis.com/LATEST_RELEASE)" \
37-
|| CHROMEDRIVER_RELEASE="$(curl -4Ls https://chromedriver.storage.googleapis.com/LATEST_RELEASE_${CHROMEDRIVER_MAJOR_RELEASE})" \
38-
&& curl -4Ls "https://chromedriver.storage.googleapis.com/${CHROMEDRIVER_RELEASE}/chromedriver_linux64.zip" \
39-
| zcat >> /usr/bin/chromedriver \
40-
&& chmod +x /usr/bin/chromedriver \
41-
&& chromedriver --version
42-
43-
RUN \
44-
apt-dpkg-wrap apt-get update \
45-
&& apt-dpkg-wrap apt-get install -y jitsi-upload-integrations jq \
46-
&& apt-cleanup
12+
RUN apt-dpkg-wrap apt-get update && \
13+
apt-dpkg-wrap apt-get install -y jibri libgl1-mesa-dri procps && \
14+
apt-cleanup && \
15+
[ "${CHROME_RELEASE}" = "latest" ] && \
16+
wget -qO - https://dl-ssl.google.com/linux/linux_signing_key.pub | gpg --dearmour /etc/apt/trusted.gpg.d/google.gpg && \
17+
echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" > /etc/apt/sources.list.d/google-chrome.list && \
18+
apt-dpkg-wrap apt-get update && \
19+
apt-dpkg-wrap apt-get install -y google-chrome-stable && \
20+
apt-cleanup || \
21+
[ "${CHROME_RELEASE}" != "latest" ] && \
22+
curl -4so "/tmp/google-chrome-stable_${CHROME_RELEASE}-1_amd64.deb" "http://dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable/google-chrome-stable_${CHROME_RELEASE}-1_amd64.deb" && \
23+
apt-dpkg-wrap apt-get update && \
24+
apt-dpkg-wrap apt-get install -y "/tmp/google-chrome-stable_${CHROME_RELEASE}-1_amd64.deb" && \
25+
apt-cleanup || \
26+
[ "${CHROMEDRIVER_MAJOR_RELEASE}" = "latest" ] && \
27+
CHROMEDRIVER_RELEASE="$(curl -4Ls https://chromedriver.storage.googleapis.com/LATEST_RELEASE)" || \
28+
CHROMEDRIVER_RELEASE="$(curl -4Ls https://chromedriver.storage.googleapis.com/LATEST_RELEASE_${CHROMEDRIVER_MAJOR_RELEASE})" && \
29+
curl -4Ls "https://chromedriver.storage.googleapis.com/${CHROMEDRIVER_RELEASE}/chromedriver_linux64.zip" \
30+
| zcat >> /usr/bin/chromedriver && \
31+
chmod +x /usr/bin/chromedriver && \
32+
chromedriver --version && \
33+
apt-dpkg-wrap apt-get update && \
34+
apt-dpkg-wrap apt-get install -y jitsi-upload-integrations jq && \
35+
apt-cleanup
4736

4837
COPY rootfs/ /
4938

5039
VOLUME /config
51-

jicofo/Dockerfile

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,10 @@ ARG JITSI_REPO=jitsi
22
ARG BASE_TAG=latest
33
FROM ${JITSI_REPO}/base-java:${BASE_TAG}
44

5-
RUN \
6-
apt-dpkg-wrap apt-get update && \
7-
apt-dpkg-wrap apt-get install -y jicofo && \
8-
apt-cleanup
5+
RUN apt-dpkg-wrap apt-get update && \
6+
apt-dpkg-wrap apt-get install -y jicofo && \
7+
apt-cleanup
98

109
COPY rootfs/ /
1110

1211
VOLUME /config
13-

jigasi/Dockerfile

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,9 @@ FROM ${JITSI_REPO}/base-java:${BASE_TAG}
44

55
ENV GOOGLE_APPLICATION_CREDENTIALS /config/key.json
66

7-
RUN \
8-
apt-dpkg-wrap apt-get update && \
9-
apt-dpkg-wrap apt-get install -y jigasi jq && \
10-
apt-cleanup
7+
RUN apt-dpkg-wrap apt-get update && \
8+
apt-dpkg-wrap apt-get install -y jigasi jq && \
9+
apt-cleanup
1110

1211
COPY rootfs/ /
1312

jvb/Dockerfile

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,9 @@ ARG JITSI_REPO=jitsi
22
ARG BASE_TAG=latest
33
FROM ${JITSI_REPO}/base-java:${BASE_TAG}
44

5-
RUN \
6-
apt-dpkg-wrap apt-get update && \
7-
apt-dpkg-wrap apt-get install -y jitsi-videobridge2 jq curl iproute2 && \
8-
apt-cleanup
5+
RUN apt-dpkg-wrap apt-get update && \
6+
apt-dpkg-wrap apt-get install -y jitsi-videobridge2 jq curl iproute2 && \
7+
apt-cleanup
98

109
COPY rootfs/ /
1110

prosody/Dockerfile

Lines changed: 20 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -3,49 +3,44 @@ ARG BASE_TAG=latest
33

44
FROM ${JITSI_REPO}/base:${BASE_TAG} as builder
55

6-
RUN \
7-
apt-dpkg-wrap apt-get update \
8-
&& apt-dpkg-wrap apt-get install -y \
6+
RUN apt-dpkg-wrap apt-get update && \
7+
apt-dpkg-wrap apt-get install -y \
98
lua5.2 \
109
liblua5.2-dev \
1110
libsasl2-dev \
1211
libssl-dev \
1312
luarocks \
1413
git \
15-
gcc \
16-
&& luarocks install cyrussasl 1.1.0-1 \
17-
&& luarocks install net-url 0.9-1 \
18-
&& luarocks install luajwtjitsi 2.0-0
14+
gcc && \
15+
luarocks install cyrussasl 1.1.0-1 && \
16+
luarocks install net-url 0.9-1 && \
17+
luarocks install luajwtjitsi 2.0-0
1918

2019
FROM ${JITSI_REPO}/base:${BASE_TAG}
2120

2221
ENV XMPP_CROSS_DOMAIN="false"
2322

24-
RUN \
25-
wget -q https://prosody.im/files/prosody-debian-packages.key -O - | gpg --enarmor > /etc/apt/trusted.gpg.d/prosody.asc \
26-
&& echo "deb http://packages.prosody.im/debian buster main" > /etc/apt/sources.list.d/prosody.list \
27-
&& apt-dpkg-wrap apt-get update \
28-
&& apt-dpkg-wrap apt-get install -y \
23+
RUN wget -qO /etc/apt/trusted.gpg.d/prosody.gpg https://prosody.im/files/prosody-debian-packages.key && \
24+
echo "deb http://packages.prosody.im/debian buster main" > /etc/apt/sources.list.d/prosody.list && \
25+
apt-dpkg-wrap apt-get update && \
26+
apt-dpkg-wrap apt-get install -y \
2927
prosody \
3028
libssl1.1 \
3129
sasl2-bin \
3230
libsasl2-modules-ldap \
3331
lua-basexx \
3432
lua-ldap \
3533
lua-sec \
36-
patch \
37-
&& apt-cleanup \
38-
&& rm -rf /etc/prosody
39-
40-
RUN \
41-
apt-dpkg-wrap apt-get update \
42-
&& apt-dpkg-wrap apt-get -d install -y jitsi-meet-prosody \
43-
&& dpkg -x /var/cache/apt/archives/jitsi-meet-prosody*.deb /tmp/pkg \
44-
&& mv /tmp/pkg/usr/share/jitsi-meet/prosody-plugins /prosody-plugins \
45-
&& apt-cleanup \
46-
&& rm -rf /tmp/pkg /var/cache/apt
47-
48-
RUN patch -d /usr/lib/prosody/modules/muc -p0 < /prosody-plugins/muc_owner_allow_kick.patch
34+
patch && \
35+
apt-cleanup && \
36+
rm -rf /etc/prosody && \
37+
apt-dpkg-wrap apt-get update && \
38+
apt-dpkg-wrap apt-get -d install -y jitsi-meet-prosody && \
39+
dpkg -x /var/cache/apt/archives/jitsi-meet-prosody*.deb /tmp/pkg && \
40+
mv /tmp/pkg/usr/share/jitsi-meet/prosody-plugins /prosody-plugins && \
41+
apt-cleanup && \
42+
rm -rf /tmp/pkg /var/cache/apt && \
43+
patch -d /usr/lib/prosody/modules/muc -p0 < /prosody-plugins/muc_owner_allow_kick.patch
4944

5045
COPY rootfs/ /
5146

web/Dockerfile

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,15 @@ FROM ${JITSI_REPO}/base:${BASE_TAG}
55
ADD https://raw.githubusercontent.com/acmesh-official/acme.sh/2.8.8/acme.sh /opt
66
COPY rootfs/ /
77

8-
RUN \
9-
apt-dpkg-wrap apt-get update && \
10-
apt-dpkg-wrap apt-get install -y cron nginx-extras jitsi-meet-web socat && \
11-
apt-dpkg-wrap apt-get -d install -y jitsi-meet-web-config && \
8+
RUN apt-dpkg-wrap apt-get update && \
9+
apt-dpkg-wrap apt-get install -y cron nginx-extras jitsi-meet-web socat && \
10+
apt-dpkg-wrap apt-get -d install -y jitsi-meet-web-config && \
1211
dpkg -x /var/cache/apt/archives/jitsi-meet-web-config*.deb /tmp/pkg && \
1312
mv /tmp/pkg/usr/share/jitsi-meet-web-config/config.js /defaults && \
14-
mv /usr/share/jitsi-meet/interface_config.js /defaults && \
15-
rm -f /etc/nginx/conf.d/default.conf && \
16-
apt-cleanup && \
17-
rm -rf /tmp/pkg /var/cache/apt
13+
mv /usr/share/jitsi-meet/interface_config.js /defaults && \
14+
rm -f /etc/nginx/conf.d/default.conf && \
15+
apt-cleanup && \
16+
rm -rf /tmp/pkg /var/cache/apt
1817

1918
EXPOSE 80 443
2019

0 commit comments

Comments
 (0)