Shrink the docker image size

main
Aurélien Geron 2021-03-06 19:51:19 +13:00
parent 5da46e924c
commit d399affb5c
1 changed files with 7 additions and 5 deletions

View File

@ -1,7 +1,6 @@
FROM continuumio/miniconda3:latest FROM continuumio/miniconda3:latest
RUN apt-get update && apt-get upgrade -y \ RUN apt-get update && apt-get install -y \
&& apt-get install -y \
build-essential \ build-essential \
cmake \ cmake \
ffmpeg \ ffmpeg \
@ -16,13 +15,16 @@ RUN apt-get update && apt-get upgrade -y \
xvfb \ xvfb \
zip \ zip \
zlib1g-dev \ zlib1g-dev \
&& apt clean \
&& rm -rf /var/lib/apt/lists/* && rm -rf /var/lib/apt/lists/*
COPY environment.yml /tmp/ COPY environment.yml /tmp/
RUN conda update -y -n base conda \ RUN echo ' - pyvirtualdisplay' >> /tmp/environment.yml \
&& echo ' - pyvirtualdisplay' >> /tmp/environment.yml \
&& conda env create -f /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 && rm /tmp/environment.yml
ARG username ARG username