Skip to content

Latest commit

 

History

History
22 lines (17 loc) · 436 Bytes

02_cmd_vs_entrypoint.md

File metadata and controls

22 lines (17 loc) · 436 Bytes

Test difference between CMD and ENTRYPOINT

Create Dockerfiles for these variations and check how command is executed in container:

  • plain string

    CMD ping localhost
    
  • array of commands

    CMD ["ping", "localhost"]
    
  • separate entrypoint

    ENTRYPOINT ["ping"]
    CMD ["localhost"]
    
  • Specify Environment variables in different forms and observe behavior