From d90369b67c16ba1b237d143bc216139b01d0c8e1 Mon Sep 17 00:00:00 2001 From: Frank Sachsenheim Date: Sat, 2 Jan 2021 16:33:05 +0100 Subject: [PATCH] Dockerfile: Reduces layers and size --- Dockerfile | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index 3497171..9a58b20 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,9 +11,7 @@ EXPOSE 5232 # Run Radicale (Configure it here or provide a "config" file!) CMD ["radicale", "--hosts", "0.0.0.0:5232"] -# Install dependencies -RUN apk add --no-cache gcc musl-dev libffi-dev ca-certificates openssl -# Install Radicale -RUN pip install --no-cache-dir "Radicale[bcrypt] @ https://github.com/Kozea/Radicale/archive/${VERSION}.tar.gz" -# Remove build dependencies -RUN apk del gcc musl-dev libffi-dev +RUN apk add --no-cache ca-certificates openssl \ + && apk add --no-cache --virtual .build-deps gcc libffi-dev musl-dev \ + && pip install --no-cache-dir "Radicale[bcrypt] @ https://github.com/Kozea/Radicale/archive/${VERSION}.tar.gz" \ + && apk del .build-deps