File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -51,12 +51,11 @@ ARG ENV_NAME=dev
5151# libxml2-dev is needed for uwsgi in the production stage
5252# mime-support install (/etc/mime.types) which is needded uWSGI to server static files with the correct mime types
5353RUN apt-get update \
54- && apt-get install -y locales libxml2-dev mime-support \
54+ && apt-get install -y --no-install-recommends locales libxml2-dev mime-support \
5555 && echo "LC_ALL=en_US.UTF-8" >> /etc/environment \
5656 && echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen \
5757 && echo "LANG=en_US.UTF-8" > /etc/locale.conf \
58- && locale-gen en_US.UTF-8 \
59- && rm -rf /var/lib/apt/lists/*
58+ && locale-gen en_US.UTF-8
6059
6160ENV VIRTUAL_ENV=/opt/venv
6261ENV LANG=en_US.UTF-8 \
@@ -69,13 +68,14 @@ ENV LANG=en_US.UTF-8 \
6968
7069WORKDIR /srv/app
7170
71+ # Only install Git if it's the dev environment
72+ RUN if [ "$ENV_NAME" = "dev" ]; then apt-get install -y --no-install-recommends git; fi \
73+ && rm -rf /var/lib/apt/lists/*
74+
7275RUN set -ex \
7376 && groupadd -r app && useradd --uid=2000 --create-home --home-dir=/home/app --no-log-init -r -g app app \
7477 && echo "\nsource ./config/bash/bashrc" >> /home/app/.bashrc
7578
76- # Only install Git if it's the dev environment
77- RUN if [ "$ENV_NAME" == "dev" ]; then apt-get install git; fi
78-
7979COPY --from=python-requirements --chown=app:app $VIRTUAL_ENV $VIRTUAL_ENV
8080
8181USER app
You can’t perform that action at this time.
0 commit comments