Docker Cheat Sheet

  • Dockerfile commands
    • RUN = during build time, run commands and save the result
    • ENTRYPOINT = during run time
      • make the container act as an executable, commands given by CLI are treated as arguments to this executable
    • CMD = during run time
      • execute a default command if no command given by CLI
      • if there is an ENTRYPOINT, this will instead set default arguments, which can be overridden by CLI
      • think of CMD as default arguments to the docker run command

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s