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 @@ -34,12 +34,11 @@ ARG ENV_NAME=dev
3434# libxml2-dev is needed for uwsgi in the production stage
3535# mime-support install (/etc/mime.types) which is needded uWSGI to server static files with the correct mime types
3636RUN apt-get update \
37- && apt-get install -y locales libxml2-dev mime-support \
37+ && apt-get install -y --no-install-recommends locales libxml2-dev mime-support \
3838 && echo "LC_ALL=en_US.UTF-8" >> /etc/environment \
3939 && echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen \
4040 && echo "LANG=en_US.UTF-8" > /etc/locale.conf \
41- && locale-gen en_US.UTF-8 \
42- && rm -rf /var/lib/apt/lists/*
41+ && locale-gen en_US.UTF-8
4342
4443ENV VIRTUAL_ENV=/opt/venv
4544ENV LANG=en_US.UTF-8 \
@@ -52,13 +51,14 @@ ENV LANG=en_US.UTF-8 \
5251
5352WORKDIR /srv/app
5453
54+ # Only install Git if it's the dev environment
55+ RUN if [ "$ENV_NAME" = "dev" ]; then apt-get install -y --no-install-recommends git; fi \
56+ && rm -rf /var/lib/apt/lists/*
57+
5558RUN set -ex \
5659 && groupadd -r app && useradd --uid=2000 --create-home --home-dir=/home/app --no-log-init -r -g app app \
5760 && echo "\nsource ./config/bash/bashrc" >> /home/app/.bashrc
5861
59- # Only install Git if it's the dev environment
60- RUN if [ "$ENV_NAME" == "dev" ]; then apt-get install git; fi
61-
6262COPY --from=python-requirements --chown=app:app $VIRTUAL_ENV $VIRTUAL_ENV
6363
6464USER app
You can’t perform that action at this time.
0 commit comments