Skip to content

Reduction of image size with multi-staging Dockerfile #412

Answered by wholtz
aulasau asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @aulasau . It is unclear to me how a multi-stage build is helping you here. I guess you avoid having from_history_mamba_env.yaml in one of your layers, but this optimization seems like overkill for a file that small.

Have you tried using one of our alpine based images? That would be an easy way to save a few MBs. You are missing a && rm -rf /var/lib/apt/lists/* on the end of your RUN apt-get ... That will save you a little bit as well.

I imagine with a couple of find ... -delete commands you could trim this down by removing test/tests directories, but those type of optimizations cannot be universally applied.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@aulasau
Comment options

Answer selected by aulasau
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants