diff --git a/Dockerfile b/Dockerfile index 897ecb059..49d819847 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,28 +9,29 @@ ENV PYTHONDONTWRITEBYTECODE 1 ENV DEBIAN_FRONTEND noninteractive -ENV BUILD_PACKAGES apt-file libpq-dev graphviz-dev graphviz build-essential git pkg-config \ +ENV BUILD_PACKAGES apt-utils apt-file libpq-dev graphviz-dev build-essential git pkg-config \ python3-dev libxml2-dev libjpeg-dev libssl-dev libffi-dev libxslt1-dev \ - python3-lxml python3-magic postgresql-client libcairo2-dev \ - python3-psycopg2 poppler-utils vim curl jq vim bash software-properties-common \ - software-properties-common python3-setuptools python3-venv nginx tzdata nodejs + libcairo2-dev software-properties-common python3-setuptools python3-pip +ENV RUN_PACKAGES graphviz python3-lxml python3-magic postgresql-client python3-psycopg2 \ + poppler-utils curl jq bash python3-venv tzdata nodejs \ + fontconfig ttf-dejavu python nginx + RUN mkdir -p /var/interlegis/sapl WORKDIR /var/interlegis/sapl/ ADD . /var/interlegis/sapl/ -RUN apt-get update && apt-get upgrade -y && apt-get install -y --no-install-recommends apt-utils && \ - mkdir -p /usr/share/man/man1 && mkdir -p /usr/share/man/man7 && \ - apt-get install -y fontconfig ttf-dejavu && fc-cache -fv && \ - apt-get install -y --no-install-recommends $BUILD_PACKAGES && \ - apt-get install -y python python3-pip && \ - pip3 install --upgrade pip setuptools && \ +RUN apt-get update && \ + apt-get upgrade -y && \ + apt-get install -y --no-install-recommends $BUILD_PACKAGES $RUN_PACKAGES && \ + fc-cache -fv && \ + pip3 install --no-cache-dir --upgrade pip setuptools && \ rm -f /etc/nginx/conf.d/* && \ - pip install -r /var/interlegis/sapl/requirements/dev-requirements.txt --upgrade setuptools && \ - rm -r /root/.cache && \ - apt-get autoremove -y && apt-get clean && rm -rf /var/lib/apt/lists/* + pip install --no-cache-dir -r /var/interlegis/sapl/requirements/dev-requirements.txt --upgrade setuptools && \ + SUDO_FORCE_REMOVE=yes apt-get purge -y --auto-remove $BUILD_PACKAGES && \ + apt-get autoremove && apt-get clean && rm -rf /var/lib/apt/lists/* COPY start.sh /var/interlegis/sapl/ COPY config/nginx/sapl.conf /etc/nginx/conf.d