til
Today I Learned: collection of notes, tips and tricks and stuff I learn from day to day working with computers and technology as an open source contributor and product manager
View project on GitHub
What is the difference between RUN and CMD
RUN is an image build step and will be cached, a Dockerfile can have multiple build RUN steps
CMD is a command execution and is the endpoint of the Dockerfile processing and would execute the command you are building up to. A Dockerfile can only contain one CMD, see also ENTRYPOINT as an alternative.
References