1
0
Fork 0

fix(Dockerfile): acquire lock for installing apt packages

This was caused by deleting /var/cache/dpkg too early in the build process.
This commit is contained in:
Vojtěch Mareš 2022-09-10 14:46:58 +02:00
parent 65057ebe39
commit 140c4a7dfc
Signed by: vojtech.mares
GPG key ID: C6827B976F17240D

View file

@ -9,11 +9,7 @@ RUN apt update && apt -y install \
# Add Ondrej Sury's PPA for PHP # Add Ondrej Sury's PPA for PHP
RUN LC_ALL=C.UTF-8 add-apt-repository -y ppa:ondrej/php RUN LC_ALL=C.UTF-8 add-apt-repository -y ppa:ondrej/php
RUN apt update && \ RUN apt update
rm -rf /var/lib/apt && \
rm -rf /var/lib/dpkg && \
rm -rf /var/lib/cache && \
rm -rf /var/lib/log
# Install PHP 8.1 # Install PHP 8.1
RUN DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt -y install \ 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 \ unzip \
git 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 FROM base as builder
ARG PTERODACTYL_PANEL_VERSION="latest" ARG PTERODACTYL_PANEL_VERSION="latest"