
Easy Intro To Docker
What The Hell Is Docker?
You probably nodded along in fear when hearing people talk about Docker. Here’s a quick intro so you can speak the lingo too.
If you code, or work in tech, there's no way you haven't heard the word. Maybe you've avoided asking what it is because at this point, it feels like you should already know. Or maybe you do, and you're reading this just because. Anyway, hi. Thanks. Back to Docker. What even is that?
The One-Sentence Answer
Docker lets you package an app with everything it needs to run, like code, system tools, libraries, settings, then run it anywhere so "It works on my machine" will no longer be a default answer.
What’s the Difference?
Without Docker: You install Node, install Postgres, install Redis, pray the versions are compatible, then spend all day trying to figure out why Postgres won’t work.
With Docker: You write a *docker-compose.yml* file.
version: '3'
services:
app:
image: node:18
ports:
- "3000:3000"
db:
image: postgres:15
cache:
image: redis:7Then run *docker compose up* (or docker-compose up on older setups) and everything starts (if the syntax is correct). Everything talks to everything else, so someone else can run the same command and get the exact same environment. It's kind of like venv, but for the entire stack instead of just Python packages, and with its own lightweight virtual OS.
The Lingo You Need to Know
Image: The blueprint. A frozen snapshot of your app and its dependencies.
Container: The running instance. You start a container from an image.
Dockerfile: This is like a recipe. It’s a text file that builds an image.
# A simple Dockerfile
FROM node:18
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY . .
CMD ["node", "server.js"]Registry: A library of images. Docker Hub is the default, but you can pull images with one command:
docker pull node:18
docker pull postgres:15
docker pull redis:7Commands You'll Use
docker pull <image> # Download an image
docker run <image> # Start a container
docker ps # List running containers
docker stop <container> # Stop a container
docker rm <container> # Remove a container
docker images # List downloaded images
docker rmi <image> # Remove an imageThat's about 80% of what you'll ever need. The rest you'll Google when the time comes. Or just use cheatsheets.
You Can Try It Right Now
Some IDEs like VS Code have extensions that could make this process a breeze. Start here, then dig deeper later.
Install Docker, open your terminal, and run this:
docker run -d -p 8080:80 nginxOpen your browser to `http://localhost:8080`. Behold, the Nginx welcome page. You just ran a web server in a container without installing Nginx on your machine. If this isn’t high sorcery, what is?
So?
You really don't need to be a Docker expert. Start by running pre-built images, then write a Dockerfile for your own app (spin up something on your own, this isn’t the tutorial for that), then add *docker compose* to tie everything together. You don’t have to master every command, but you probably know this already. Go crazy.
Tags
Join the Discussion
Enjoyed this? Ask questions, share your take (hot, lukewarm, or undecided), or follow the thread with people in real time. The community’s open, join us.









