Skip to content

Commit 0692e3d

Browse files
committed
Fix Git not installing
1 parent b6d7f0c commit 0692e3d

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

config/docker/Dockerfile.web

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff 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
5353
RUN 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

6160
ENV VIRTUAL_ENV=/opt/venv
6261
ENV LANG=en_US.UTF-8 \
@@ -69,13 +68,14 @@ ENV LANG=en_US.UTF-8 \
6968

7069
WORKDIR /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+
7275
RUN 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-
7979
COPY --from=python-requirements --chown=app:app $VIRTUAL_ENV $VIRTUAL_ENV
8080

8181
USER app

0 commit comments

Comments
 (0)