From 140c4a7dfca81b4f1690f65007511580155f48e4 Mon Sep 17 00:00:00 2001 From: Vojtech Mares Date: Sat, 10 Sep 2022 14:46:58 +0200 Subject: [PATCH] fix(Dockerfile): acquire lock for installing apt packages This was caused by deleting /var/cache/dpkg too early in the build process. --- Dockerfile | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 217a80e..7a1ee2a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,11 +9,7 @@ RUN apt update && apt -y install \ # Add Ondrej Sury's PPA for PHP RUN LC_ALL=C.UTF-8 add-apt-repository -y ppa:ondrej/php -RUN apt update && \ - rm -rf /var/lib/apt && \ - rm -rf /var/lib/dpkg && \ - rm -rf /var/lib/cache && \ - rm -rf /var/lib/log +RUN apt update # Install PHP 8.1 RUN DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt -y install \ @@ -32,6 +28,11 @@ RUN DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt -y install \ unzip \ git +RUN rm -rf /var/lib/apt && \ + rm -rf /var/lib/dpkg && \ + rm -rf /var/lib/cache && \ + rm -rf /var/lib/log + FROM base as builder ARG PTERODACTYL_PANEL_VERSION="latest"