Deploy Your First Container

Commands

docker

Shows all available Docker commands and help text.


docker run hello-world

Pulls (if not already local) and runs the hello-world container. The container starts, prints a message, and stops.

Tasks

  1. Open a terminal — either the OS shell (CMD, PowerShell) or the built-in Docker Desktop terminal.
  2. Run docker run hello-world to verify that Docker is working. The image will be pulled automatically and the container will run, print a message, and exit.

Key Points

Almost all Docker commands begin with docker. Running docker alone displays full help text.

docker run is the primary command to start a container. If the image is not already local, Docker pulls it from a registry automatically.

A container is the running instance of an image — it is a process loaded into memory from that image.



An image is a downloadable file (similar to a zip archive) containing all the software needed to run a container.

When Docker pulls an image, the word 'pull' means download. The reverse — 'push' — means upload.

Every image has at least one tag. If no tag is specified, Docker uses the latest tag by default.



Some containers are short-lived: they start, complete a task, and then stop automatically. This pattern is useful for on-demand tasks such as backups or metric collection.

Some containers run indefinitely — for example, a web server container.


Complete and Continue  
Discussion

0 comments