From 030269b5969d35f810b7cddb154b14a195de82cb Mon Sep 17 00:00:00 2001 From: ReenigneArcher <42013603+ReenigneArcher@users.noreply.github.com> Date: Sun, 19 Dec 2021 14:55:53 -0500 Subject: [PATCH] Cleanup dockerfiles --- scripts/Dockerfile-debian | 8 ++++---- scripts/Dockerfile-fedora_33 | 5 ++--- scripts/Dockerfile-fedora_35 | 5 ++--- scripts/Dockerfile-ubuntu_18_04 | 9 ++++----- scripts/Dockerfile-ubuntu_20_04 | 7 +++---- scripts/Dockerfile-ubuntu_21_04 | 7 +++---- scripts/Dockerfile-ubuntu_21_10 | 7 +++---- 7 files changed, 21 insertions(+), 27 deletions(-) diff --git a/scripts/Dockerfile-debian b/scripts/Dockerfile-debian index 0444edc7..fbcffd74 100644 --- a/scripts/Dockerfile-debian +++ b/scripts/Dockerfile-debian @@ -3,9 +3,10 @@ FROM debian:bullseye AS sunshine-debian ARG DEBIAN_FRONTEND=noninteractive ARG TZ="Europe/London" +SHELL ["/bin/bash", "-o", "pipefail", "-c"] RUN echo deb http://deb.debian.org/debian/ bullseye main contrib non-free | tee /etc/apt/sources.list.d/non-free.list RUN apt-get update -y && \ - apt-get install -y \ + apt-get install -y --no-install-recommends \ build-essential \ cmake \ git \ @@ -29,9 +30,8 @@ RUN apt-get update -y && \ libxtst-dev \ nvidia-cuda-dev \ nvidia-cuda-toolkit \ - && \ - apt-get clean && \ - apt-get autoclean + && apt-get clean \ + && rm -rf /var/lib/apt/lists/* COPY build-private.sh /root/build.sh diff --git a/scripts/Dockerfile-fedora_33 b/scripts/Dockerfile-fedora_33 index 03075d04..af5a40be 100644 --- a/scripts/Dockerfile-fedora_33 +++ b/scripts/Dockerfile-fedora_33 @@ -15,9 +15,8 @@ RUN dnf -y update && \ openssl-devel \ opus-devel \ pulseaudio-libs-devel \ - && \ - dnf clean all && \ - rm -rf /var/cache/yum + && dnf clean all \ + && rm -rf /var/cache/yum COPY build-private.sh /root/build.sh diff --git a/scripts/Dockerfile-fedora_35 b/scripts/Dockerfile-fedora_35 index 04628c09..6596f561 100644 --- a/scripts/Dockerfile-fedora_35 +++ b/scripts/Dockerfile-fedora_35 @@ -20,9 +20,8 @@ RUN dnf -y update && \ openssl-devel \ opus-devel \ pulseaudio-libs-devel \ - && \ - dnf clean all && \ - rm -rf /var/cache/yum + && dnf clean all \ + && rm -rf /var/cache/yum COPY build-private.sh /root/build.sh diff --git a/scripts/Dockerfile-ubuntu_18_04 b/scripts/Dockerfile-ubuntu_18_04 index 1b8ffd18..2ceac2b5 100644 --- a/scripts/Dockerfile-ubuntu_18_04 +++ b/scripts/Dockerfile-ubuntu_18_04 @@ -5,10 +5,10 @@ ARG TZ="Europe/London" RUN add-apt-repository ppa:ubuntu-toolchain-r/test && \ apt-get update -y && \ - apt-get install -y \ + apt-get install -y --no-install-recommends \ build-essential \ cmake \ - gcc-10 + gcc-10 \ git \ g++-10 \ libavdevice-dev \ @@ -31,9 +31,8 @@ RUN add-apt-repository ppa:ubuntu-toolchain-r/test && \ libxtst-dev \ software-properties-common \ wget \ - && \ - apt-get clean && \ - apt-get autoclean + && apt-get clean \ + && rm -rf /var/lib/apt/lists/* RUN cp /usr/bin/gcc-10 /usr/bin/gcc && cp /usr/bin/g++-10 /usr/bin/gcc-10 diff --git a/scripts/Dockerfile-ubuntu_20_04 b/scripts/Dockerfile-ubuntu_20_04 index 75169813..e6baea1a 100644 --- a/scripts/Dockerfile-ubuntu_20_04 +++ b/scripts/Dockerfile-ubuntu_20_04 @@ -4,7 +4,7 @@ ARG DEBIAN_FRONTEND=noninteractive ARG TZ="Europe/London" RUN apt-get update -y && \ - apt-get install -y \ + apt-get install -y --no-install-recommends \ build-essential \ cmake \ git \ @@ -28,9 +28,8 @@ RUN apt-get update -y && \ libxrandr-dev \ libxtst-dev \ wget \ - && \ - apt-get clean && \ - apt-get autoclean + && apt-get clean \ + && rm -rf /var/lib/apt/lists/* RUN cp /usr/bin/gcc-10 /usr/bin/gcc && cp /usr/bin/g++-10 /usr/bin/gcc-10 diff --git a/scripts/Dockerfile-ubuntu_21_04 b/scripts/Dockerfile-ubuntu_21_04 index 1972e2be..a584d6e3 100644 --- a/scripts/Dockerfile-ubuntu_21_04 +++ b/scripts/Dockerfile-ubuntu_21_04 @@ -4,7 +4,7 @@ ARG DEBIAN_FRONTEND=noninteractive ARG TZ="Europe/London" RUN apt-get update -y && \ - apt-get install -y \ + apt-get install -y --no-install-recommends \ build-essential \ cmake \ git \ @@ -28,9 +28,8 @@ RUN apt-get update -y && \ libxtst-dev \ nvidia-cuda-dev \ nvidia-cuda-toolkit \ - && \ - apt-get clean && \ - apt-get autoclean + && apt-get clean \ + && rm -rf /var/lib/apt/lists/* COPY build-private.sh /root/build.sh diff --git a/scripts/Dockerfile-ubuntu_21_10 b/scripts/Dockerfile-ubuntu_21_10 index d5fab928..dc067231 100644 --- a/scripts/Dockerfile-ubuntu_21_10 +++ b/scripts/Dockerfile-ubuntu_21_10 @@ -4,7 +4,7 @@ ARG DEBIAN_FRONTEND=noninteractive ARG TZ="Europe/London" RUN apt-get update -y && \ - apt-get install -y \ + apt-get install -y --no-install-recommends \ build-essential \ cmake \ git \ @@ -28,9 +28,8 @@ RUN apt-get update -y && \ libxtst-dev \ nvidia-cuda-dev \ nvidia-cuda-toolkit \ - && \ - apt-get clean && \ - apt-get autoclean + && apt-get clean \ + && rm -rf /var/lib/apt/lists/* COPY build-private.sh /root/build.sh