Home / Guides

Docker for Beginners: Run Your First Container

Containers package an app with everything it needs, so it runs the same on your laptop, a home server or a cloud server. Learn them once and a lot of cloud work gets easier.

Containers vs. virtual machines

A virtual machine includes a whole operating system. A container shares the host's kernel and packs only the app and its libraries, so it is smaller and starts in seconds.

Your first container

  1. Install Docker on your computer or a small server.
  2. Run a tiny web server image and open it in your browser.
  3. List running containers, then stop and remove it.
  4. Run it again with a different port.

Key words

WordMeaning
ImageA packaged, read-only template.
ContainerA running copy of an image.
VolumeStorage that outlives the container.
ComposeA file that describes several containers together.

Habits that save trouble

Where it leads

From here, look at Compose, then orchestration tools. Books like Docker Deep Dive make a good guide.

Gear and reading that fits this guide

Photos and links go to Amazon. Check the current price, model and seller there.

Docker Deep Dive product photo

Docker Deep Dive

A friendly first book on containers, from images to networking.

Check it on Amazon →
Kubernetes: Up and Running product photo

Kubernetes: Up and Running

The practical guide to running containers at scale.

Check it on Amazon →
Cloud Native DevOps with Kubernetes product photo

Cloud Native DevOps with Kubernetes

Build, deploy and scale modern apps on Kubernetes.

Check it on Amazon →

Want the whole shelf sorted by type? Browse all Top Picks →