Docker runs your project in an isolated container — the same environment in dev and in production.
Install
curl -fsSL https://get.docker.com | sudo sh
sudo usermod -aG docker $USERdocker-compose.yml
services:
web:
image: nginx:alpine
ports: ["80:80"]
restart: unless-stoppedRun it
docker compose up -d
docker compose logs -f
docker compose down💡
restart: unless-stopped brings containers back automatically after a reboot.