3 ms·
Docker does cache COPY calls AFAIK. If you're copying your whole directory though the cache breaks if any file changes. The normal way of doing it is to copy
by shawabawa3 10y ago
Docker does cache COPY calls AFAIK.
If you're copying your whole directory though the cache breaks if any file changes.
The normal way of doing it is to copy stuff like requirements.txt, package.json, Gemfile etc first and install stuff, then copy everything else at the end
- yladiz 10y agoAh, maybe that's true, I always figured it didn't cache it since it wasn't text. In this case it doesn't matter since the script would change, but if the scripts were broken apart and ran using RUN commands it would be a better middle-ground solution than wholly putting it all in a script with a single RUN command.