RUNis an image build step and will be cached, aDockerfilecan have multiple buildRUNstepsCMDis a command execution and is the endpoint of theDockerfileprocessing and would execute the command you are building up to. ADockerfilecan only contain oneCMD, see alsoENTRYPOINTas an alternative.