Apr 1, 2021
Agree with another comment on leveraging multi-stage run.
For instance, like a having a stage that perform the package installation and a later stage of source code copy/deploy. This helps when deploying new source code (given the same packages are used) and Docker would load the previous stage cache and do not re-download and rebuild packages, that would save a lot of time.