RUN
is an image build step and will be cached, aDockerfile
can have multiple buildRUN
stepsCMD
is a command execution and is the endpoint of theDockerfile
processing and would execute the command you are building up to. ADockerfile
can only contain oneCMD
, see alsoENTRYPOINT
as an alternative.