doAzureParallel icon indicating copy to clipboard operation
doAzureParallel copied to clipboard

Slow build performance with so many RUN statements

Open heaths opened this issue 9 years ago • 1 comments

https://github.com/Azure/doAzureParallel/blob/24f0cbb1d7fbe305680aadf4c8880990a503a6e1/docker-image/mro-base/Dockerfile#L4

Each one of these RUN statements creates a new layer and requires spinning up a new container. You should consolidate them into a since RUN (or at least fewer) to improve image build performance and reduce the number of layer downloads required. Your other Dockerfile in the sibling directory has an example.

heaths avatar Nov 21 '17 22:11 heaths

@heaths - thanks for the tip. I completely agree that we can coalesce the RUN statements. At the moment though, we are not using that Dockerfile. Once we release our own version of MRO I'll make sure to optimize it.

paselem avatar Nov 22 '17 22:11 paselem