From d399affb5c1207c68c0ae3e4385d0729b8457cd8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20Geron?= Date: Sat, 6 Mar 2021 19:51:19 +1300 Subject: [PATCH] Shrink the docker image size --- docker/Dockerfile | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index 955f6ca..04f88c3 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,7 +1,6 @@ FROM continuumio/miniconda3:latest -RUN apt-get update && apt-get upgrade -y \ - && apt-get install -y \ +RUN apt-get update && apt-get install -y \ build-essential \ cmake \ ffmpeg \ @@ -16,13 +15,16 @@ RUN apt-get update && apt-get upgrade -y \ xvfb \ zip \ zlib1g-dev \ + && apt clean \ && rm -rf /var/lib/apt/lists/* COPY environment.yml /tmp/ -RUN conda update -y -n base conda \ - && echo ' - pyvirtualdisplay' >> /tmp/environment.yml \ +RUN echo ' - pyvirtualdisplay' >> /tmp/environment.yml \ && conda env create -f /tmp/environment.yml \ - && conda clean -y -t \ + && conda clean -afy \ + && find /opt/conda/ -follow -type f -name '*.a' -delete \ + && find /opt/conda/ -follow -type f -name '*.pyc' -delete \ + && find /opt/conda/ -follow -type f -name '*.js.map' -delete \ && rm /tmp/environment.yml ARG username