Table of Content

  1. Docker
  2. Building & Publishing Images
  3. Docker Swarm

Docker Command Format

Docker Commands, Help & Tips · GitHub

docker
docker version 	# Verify CLI can talk to Engine
docker info     # Config Settings of Engine

New Docker Command Format

docker <command> <sub-command> (options)
docker container run

Old Docker Command Format

docker <command> (options)
docker run

Docker Command Examples

Miscellaneous Points

  • Containers are only alive till the command that started the container is running
  • When we specify an command at the end of the “docker run” command it will overwrite the default startup command of the container
  • It is best practice to create a new network for each application
  • The default network driver used by Docker is Bridge. The default bridge does not have a DNS Server. To overcome this issue the --link flag can be used which allows to link containers that need to communicate with each other together
  • When we run a container an new read/ write layer is added over the base image (a new copy of base image is not created) because of this only extra space for the new layer is required