Technical
Docker for Developers Who Just Want It to Work
I avoided Docker for years because every tutorial started with container theory and image layers. I did not care about layers. I cared about running my database locally without installing it. Here is the practical Docker guide I wish I had.
What Docker Actually Solves
Docker solves one problem: 'It works on my machine.' Instead of installing databases, message queues, and services directly on your laptop (polluting your system, version conflicts, painful uninstalls), you run them in isolated containers.
The Only Three Commands You Need
docker compose up -d # Start all services defined in docker-compose.yml
docker compose down # Stop all services
docker compose logs -f # Watch service logs in real-timeThat is it for daily use. Everything else is configuration.
The docker-compose.yml File
This is where you define what services to run. Here is a real example from my blog platform:
version: '3.8'
services:
dynamodb-local:
image: amazon/dynamodb-local:latest
ports:
- '8042:8000'
command: '-jar DynamoDBLocal.jar -sharedDb -inMemory'That gives me a local DynamoDB on port 8042. No AWS account needed. No installation. No configuration files scattered across my system. One YAML file, one command.
When to Add More Services
Need Redis for caching? Add it:
redis:
image: redis:7-alpine
ports:
- '6379:6379'Need PostgreSQL? Add it:
postgres:
image: postgres:16-alpine
ports:
- '5432:5432'
environment:
POSTGRES_PASSWORD: localdevEach service is 4-8 lines of YAML. No installation guides, no version manager, no cleanup.
What You Do NOT Need to Learn
Skip these topics until you actually need them:
- Dockerfiles: You do not need to build custom images for local development. Use official images from Docker Hub.
- Image layers: Internal optimization detail. Irrelevant for using Docker.
- Container networking: docker-compose handles it. Services find each other by name.
- Volume management: Only matters when you need data persistence. Start with in-memory.
- Docker Swarm/Kubernetes: Orchestration for production. Not for local development.
The Development Workflow
- Clone the project
- Run
docker compose up -d - Start your application (FastAPI, Next.js, Django)
- Develop normally. The services are just there.
- Run
docker compose downwhen done
New team member joins? They run the same two commands and have the same environment. No 'works on my machine' problems.
See the Docker Compose documentation for the full configuration reference.
RELATED READING
The Consulting Shift I Am Making In Year Two
After a year of writing and building, my consulting practice is changing shape. Shorter engagements. Sharper outcomes.
ReadThe Frontend Shift: Shipping Less JavaScript In Year Two
A year ago I reached for Next.js for everything. This year I often reach for nothing.
ReadThe Serverless Lesson I Would Write On A Sticky Note
After a year of shipping serverless projects, one rule explains most of the wins and all of the losses.
Read