Containers & Images
Container vs Virtual Machine
Image vs Container
Registry, Docker Hub, Repository
Tag, Digest, Official Images
Image Variants (slim, alpine)
Image Layers
Container Lifecycle
create, start, stop, remove
Main Process & Exit Codes
Writable Layer & Ephemeral Data
docker run (-d, -it, --name, --rm)
ps, exec, logs, inspect (--format)
cp, diff, history, version, info
Ports & Volumes
Port Publishing (-p, -P, bind address)
EXPOSE vs Publish
Bind Mounts, Named Volumes
Read-only Mounts
Mounting over Existing Paths
Data Persistence
Networks
User-defined Bridge Networks
Container DNS & Network Aliases
localhost inside a Container
Network Connect / Disconnect
Dockerfile
FROM, WORKDIR, COPY, RUN
CMD, ENTRYPOINT, ENV, ARG, EXPOSE
Exec Form vs Shell Form
Build Time vs Run Time
Layer Cache & Instruction Ordering
docker build
-t, -f, --build-arg
--no-cache, --progress=plain
Image Tagging
Build Context, .dockerignore
Packaging Python Apps
Python Scripts, requirements.txt
pip install in Images
FastAPI Server (uvicorn, 0.0.0.0 vs 127.0.0.1)
python -m, PYTHONUNBUFFERED
os.getenv, -e, --env-file, ENV, ARG
Docker Compose
compose.yaml (services, image, build, ports, volumes, command)
Project Name & Service DNS
environment, env_file, ${VAR}, .env
up, down, down -v, build, --force-recreate
ps, logs, exec, run, config
MySQL in Docker
Official MySQL Image (MYSQL_* variables)
/var/lib/mysql
/docker-entrypoint-initdb.d, first initialization
Healthcheck & depends_on (service_healthy)
Started vs Ready
Multi-service Projects
One-off Jobs vs Long-running Services
run --rm, profiles, restart, --no-deps
Separate Dockerfiles & Contexts
Shared Named Volume between Services
Read-only Bind Mount for Input
Dependency Audit per Service
Troubleshooting
status, exit code, logs, exec, effective config
Local Run vs Container Run
MySQL Errors (2003, 1045, 1044, 1049, 1146)