The Bare Minimum Guide for Docker Beginners

My company suddenly told us to use Docker, so I self-studied it for a week. At first, the concepts just wouldn't stick, but after organizing them, I started to understand. I'm writing this down for people who are wandering like I was.

First, you need to get a handle on the relationship between images and containers. It helps to think of an image as a bungeoppang mold and a container as the bungeoppang stamped out of it.

You can get started with just these commonly used commands:

  • docker pull: pull an image
  • docker run: run a container
  • docker ps: check running containers; add -a for all
  • docker exec -it: go inside a container
  • docker compose up: bring up multiple containers at once

The thing that tripped me up most was port mapping. If you mix up the host:container order in the -p option, there's no hope.

After that, move on to volumes, then networks. Save Kubernetes for later. Seriously, later.

by 디지털노마드189

4 answers

Fr, this fish-shaped bun analogy alone made it click for me.

by 문과출신개발자557 · ▲0