From eef235b8ce16986817fe4c28ec2446175afeff4d Mon Sep 17 00:00:00 2001 From: Chris Wright Date: Thu, 22 Jul 2021 17:37:02 +0100 Subject: [PATCH] Optimise image size a little --- .dockerignore | 13 +++++++++++++ Dockerfile | 6 +++++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/.dockerignore b/.dockerignore index 6b8710a..43f774a 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1 +1,14 @@ .git +test_data +bin +CHANGELOG.md +data +lib +LICENSE +main.nf +nextflow.config +README.md +test_data +# we typically run tests with outputs to these: +output +work diff --git a/Dockerfile b/Dockerfile index 96f6ac3..1af0251 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,7 +9,11 @@ RUN \ && micromamba install -n base --file $HOME/environment.yaml \ && micromamba clean --all --yes \ && fix-permissions $CONDA_DIR \ - && fix-permissions $HOME + && fix-permissions $HOME \ + && rm -rf $CONDA_DIR/conda-meta \ + && rm -rf $CONDA_DIR/include \ + && rm -rf $CONDA_DIR/lib/python3.*/site-packages/pip \ + && find $CONDA_DIR -name '__pycache__' -type d -exec rm -rf '{}' '+' USER $WF_UID WORKDIR $HOME