From 785b8eb6027ef353a57bc9ae3c52aa13c1255926 Mon Sep 17 00:00:00 2001 From: Matthias Mair Date: Fri, 3 Nov 2023 23:24:25 +0100 Subject: [PATCH] Small size optimisation for devcontainer (#5852) * avoid cache directory * clean apt lists --- .devcontainer/Dockerfile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index ae1565e0af..375396bcfc 100755 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -31,17 +31,18 @@ RUN apt-get update && export DEBIAN_FRONTEND=noninteractive && \ default-libmysqlclient-dev mariadb-client \ # LDAP support libldap2-dev libsasl2-dev && \ - apt-get autoclean && apt-get autoremove + apt-get autoclean && apt-get autoremove && \ + rm -rf /var/lib/apt/lists/* # [Optional] Uncomment this line to install global node packages. # RUN su vscode -c "source /usr/local/share/nvm/nvm.sh && npm install -g " 2>&1 # Update pip -RUN pip install --upgrade pip +RUN pip install --no-cache-dir --upgrade pip # Install required base-level python packages COPY ./docker/requirements.txt base_requirements.txt -RUN pip install --disable-pip-version-check -U -r base_requirements.txt +RUN pip install --disable-pip-version-check --no-cache-dir -U -r base_requirements.txt # preserve command history between container starts # Ref: https://code.visualstudio.com/remote/advancedcontainers/persist-bash-history