D

Docker

Package an app with everything it needs so it runs the same on your laptop and on a server.

6 chapters2 tutorialsOfficial site

01 · Introduction

What Docker is

Docker runs software inside containers: lightweight boxes that carry the app, its runtime and its settings. The same container runs on macOS, Windows and Linux without the "works on my machine" problem.

For agent builders it matters because most self-hosted tools (n8n, databases, open-source agents) ship as a Docker image you can start with one command.

02 · When to use it

When to use it

  • Running a self-hosted automation tool (n8n, Dify, Open WebUI) on your own machine or VPS
  • Keeping a project's database and services identical between teammates
  • Deploying an agent to a server without installing dependencies by hand

Skip it when a hosted service already does the job and you never need to run anything yourself.

03 · Setup

Install and first run

  1. Install Docker Desktop (macOS / Windows) or the Docker Engine package (Linux).
  2. Check it works:
docker --version
docker run hello-world
  1. Learn three commands first: docker run, docker ps, docker logs.

04 · Deployment

Deploying with Compose

Most tools publish a docker-compose.yml. Put it in a folder and run:

docker compose up -d

-d keeps it running in the background. docker compose logs -f shows what it is doing; docker compose down stops everything.

05 · How to use it

Day-to-day use

  • Update a tool: docker compose pull && docker compose up -d
  • Back up data: find the volume with docker volume ls and copy it
  • Free space: docker system prune removes stopped containers and unused images

06 · Pitfalls

Pitfalls

  • Data lives in volumes, not in the container. Deleting a container without a volume loses everything.
  • Never expose a container port to the internet without a password or a reverse proxy.
  • On a small VPS, watch memory: one container per service adds up quickly.

My notes

Sign in to keep private notes on this handbook.Sign in