Refactors Dockerfile to use BUILD_PACKAGES
@@ -31,7 +31,8 @@ ENV DJANGO_ENV=${DJANGO_ENV} \
# System deps:
-RUN apt-get update \
+RUN BUILD_PACKAGES='wget' \
+ apt-get update \
&& apt-get install --no-install-recommends -y \
bash \
build-essential \
@@ -40,7 +41,7 @@ RUN apt-get update \
git \
libpq-dev \
# Defining build-time-only dependencies:
- wget \
+ $BUILD_PACKAGES \
# Installing `dockerize` utility:
# https://github.com/jwilder/dockerize
&& wget "https://github.com/jwilder/dockerize/releases/download/${DOCKERIZE_VERSION}/dockerize-linux-amd64-${DOCKERIZE_VERSION}.tar.gz" \
@@ -55,8 +56,7 @@ RUN apt-get update \
&& curl -sSL 'https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py' | python \
&& poetry --version \
# Removing build-time-only dependencies:
- && apt-get remove -y \
- wget \
+ && apt-get remove -y $BUILD_PACKAGES \
# Cleaning cache:
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \
&& apt-get clean -y && rm -rf /var/lib/apt/lists/*
