Open BlinkyStitt opened 6 years ago
I'm fine with the --no-cache
change, but how does the other change result in layers being reused? I think that would only be the case if you had another image with an ENTRYPOINT
named /entrypoint.sh
and a CMD
of ["curl"]
, right?
Right now it doesn’t change much. But if you add a version pin to curl and the latest alpine image hasn’t changed, everything up through CMD will be reused.
On Apr 17, 2018, at 4:11 PM, Mike Dillon notifications@github.com wrote:
I'm fine with the --no-cache change, but how does the other change result in layers being reused? I think that would only be the case if you had another image with an ENTRYPOINT named /entrypoint.sh and a CMD of ["curl"], right?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.
Move ENTRYPOINT and CMD earlier in the Dockerfile so layers are reused more often.
Also use
--no-cache
flag instead of manually deleting /var/cache/apk