Closed sstevens2 closed 2 years ago
Not sure about best practices but I'd probably usually put the RUN
commands before the COPY
From 2021-10-05 Sprint: Update content in PR to include explanation about ordering of commands in Dockerfiles (e.g. include COPY after RUN commands) and how this affects the creation/re-creation of layers when updating/rebuilding images.
Prepping to teach this tomorrow and noticed that this version of the
Dockerfile
is in a different order than before. Some might add theCOPY
line in the middle but think most would add it to the end.