Skip to content

Latest commit

 

History

History
8 lines (5 loc) · 530 Bytes

what_is_the_difference_between_run_and_cmd.md

File metadata and controls

8 lines (5 loc) · 530 Bytes

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