the IT Hustle
도구실전 매뉴얼소개
FundamentalsAI 활용2026-04-02•10 min 읽기

Docker in 10 Minutes: The Only Commands You Actually Need

작성: Salty Deprecated Software Engineer

✨ AI 보조 콘텐츠

이 글은 AI 지원을 받아 작성되었으며, 정확성과 품질을 위해 팀이 검토했습니다. 모든 기술 정보와 예시는 검증되었습니다.

Docker has a reputation for being complicated. It's not. The problem is that every tutorial starts with "Docker uses cgroups and namespaces to isolate processes in the Linux kernel" — and you close the tab before you learn anything useful.

Here's the truth: you need about 12 commands to use Docker for 95% of real work. The rest is edge cases and ops stuff you can Google when you need it.

This guide assumes you've installed Docker (docs.docker.com/get-docker) and have a terminal open. Let's go.

The Mental Model (30 Seconds)

Image = a blueprint (like a recipe)

Container = a running instance of that blueprint (like the cooked meal)

Docker Hub = a library of blueprints other people made (like a cookbook)

That's it. Everything else is details.

The 12 Commands You Need

1. docker pull — Download an Image

docker pull node:22

# Downloads the Node.js 22 image from Docker Hub

Like npm install but for entire environments.

2. docker run — Start a Container

docker run -it node:22 bash

# Starts a Node.js container and drops you into a shell

# -i = interactive, -t = terminal

3. docker run -d — Run in Background

docker run -d -p 3000:3000 --name myapp node:22

# -d = detached (runs in background)

# -p 3000:3000 = map port 3000 on your machine to 3000 in the container

# --name myapp = give it a name you can remember

4. docker ps — See What's Running

docker ps

# Shows all running containers

docker ps -a

# Shows ALL containers (including stopped)

5. docker stop / docker start — Control Containers

docker stop myapp

docker start myapp

6. docker logs — See What Happened

docker logs myapp

# Shows stdout/stderr from the container

docker logs -f myapp

# -f = follow (like tail -f)

7. docker exec — Run Commands Inside a Container

docker exec -it myapp bash

# Opens a shell inside a running container

# Great for debugging

8. docker build — Create Your Own Image

docker build -t my-app:v1 .

# -t = tag (name:version)

# . = use the Dockerfile in current directory

9. docker images — List Your Images

docker images

# Lists all images on your machine

10. docker rm / docker rmi — Clean Up

docker rm myapp

# Remove a stopped container

docker rmi node:22

# Remove an image

docker system prune

# Nuclear option: remove all unused containers, images, networks

11. docker-compose up — Multi-Container Apps

docker compose up -d

# Starts all services defined in docker-compose.yml

docker compose down

# Stops and removes everything

This is how you run a full stack locally — database, backend, frontend — with one command.

12. docker volume — Persist Your Data

docker run -v mydata:/app/data my-app

# -v = mount a volume so data survives container restarts

A Real-World Example: Postgres in 30 Seconds

# Start a Postgres database with one command:

docker run -d \

--name my-postgres \

-e POSTGRES_PASSWORD=secret \

-p 5432:5432 \

-v pgdata:/var/lib/postgresql/data \

postgres:16

# That's it. Connect at localhost:5432.

# Data persists because of the -v volume mount.

The Cheat Sheet

What You WantCommand
Download an imagedocker pull name:tag
Run interactivelydocker run -it name bash
Run in backgrounddocker run -d -p 3000:3000 name
See running containersdocker ps
Stop a containerdocker stop name
View logsdocker logs -f name
Shell into containerdocker exec -it name bash
Build your imagedocker build -t name:tag .
Clean everythingdocker system prune
Multi-container stackdocker compose up -d

The Bottom Line

Docker isn't hard — it's just poorly explained. The mental model is simple: images are blueprints, containers are running instances. 12 commands cover 95% of daily use. Everything else you learn as you need it.

Start with docker run -it node:22 bash. You'll be inside a Node.js environment in 10 seconds. From there, you're a Docker user.

New to the command line? Read our 10 Command Line Tools That Will 10x Your Productivity and learn Unix File Permissions Explained for Humans.

IT
Salty Deprecated Software Engineer

The IT Hustle의 편집용 필명으로 씁니다 — 노트북 수리 기사, 시스템 관리자, 스토리지 엔지니어, 소프트웨어 엔지니어로 일한 25년 이상의 경력을 이제 AI 에이전트 운영에 쏟고 있습니다. 모든 글은 게시 전에 사람이 검토합니다. 자세한 내용은 편집 원칙을 참고하세요.

도구 보기전체 아티클소개

새 소식 받기

새로운 도구, 블로그 포스트, 업데이트 소식을 가장 먼저 받아보세요. 스팸 없음.

나만의 반환각 프롬프트 생성하기

AI 프롬프트 엔진은 독자적인 기술로 내장 검증 및 모순 테스트가 포함된 프롬프트를 생성합니다.

무료 3회 생성 체험 →

회사

  • 소개
  • 실전 매뉴얼
  • AI 용어집
  • 필자 소개
  • 문의

제품

  • 도구
  • AI 가격 동향
  • 에이전트 옵스
  • 코드
  • 디자인
  • 시스템 관리
  • 생산성
  • 마케팅
  • 비즈니스

법적 고지

  • 개인정보 처리방침
  • 이용약관
  • 면책 조항
  • 편집 원칙
  • 정정 안내

© 2026 Salty Rantz LLC. 모든 권리 보유.

기술 변혁 속에서 일하는 사람들을 위해 만들었습니다.