learntodriveai.dev/Web Development/Docker and Deployment Pipeline
Web DevelopmentProject 055 unitsVerified on 16 October 2026

Docker and Deployment Pipeline

Pemba SherpaOwner and Lead Guide · Trekking outfitter · Kathmandu, Nepal
Text message · from Pemba
Every time Raj updates something, the whole thing crashes. Last October — my busiest month, Annapurna season — it went down for TWO DAYS.
Chat with Pemba

What you hand back

  • A backend container on a pinned, non-root image
  • A frontend container served by nginx
  • A database, backend and frontend running on one network
  • A measured recovery time after a container restart
  • A rebuild flow that changes the form without touching the live system
  • A README with build steps and the Docker versus Vercel comparison

5 units

  1. Unit 1: Pemba's Booking System

    Set up the project, read Pemba's message, explore the booking application, and ask him about the gaps.

    Open unit 1
  2. Unit 2: Planning the Container

    Read the Docker guide, plan the order of work, choose what Claude sees, and write the tickets.

    Open unit 2
  3. Unit 3: The Backend Container

    Write the backend Dockerfile with pinned image and non-root user, build it, and run it beside a database container.

    Open unit 3
  4. Unit 4: The Full Stack in Containers

    Start a fresh session, write the multi-stage frontend Dockerfile, and connect all three containers on one network.

    Open unit 4
  5. Unit 5: Ship and Verify

    Time a backend restart, rebuild a changed frontend, compare Docker with Vercel, run Lighthouse, and report back to Pemba.

    Open unit 5
Read the full brief

You're containerizing an existing booking application for a trekking outfitter in Kathmandu — wrapping its React frontend and Express backend in Docker so the application runs the same everywhere.

The discipline skills: writing Dockerfiles, managing build layers and image size, configuring multi-container environments, and comparing container-based deployment against platform deployment.

The AI-direction lesson: the shift from building to directing. Until now, you could get away with loading everything into a session and letting AI sort it out. Docker work involves multiple interacting concerns — the Dockerfile, the application, the database, the networking — and including everything dilutes AI's attention. This is the first project where you decide what context AI needs for each session, plan the sequence of requests before starting, and write explicit constraints about what AI should not do. How you direct matters as much as what you direct.

Your Role

You containerize Pemba's existing booking application. The React frontend and Express backend go into Docker containers you build; PostgreSQL runs in a third container from the official postgres image, loaded with Pemba's schema and seed data. When you're done, the application runs in an environment you control — identical on your machine, on a test server, and in production.

The planning pipeline continues from before. You still have templates and guides. What changes: you plan the work sequence explicitly before starting, and you decide what context Claude needs for each session. Docker work involves multiple concerns — the Dockerfile, the application, the database, the networking — and each session works better when you choose what to include rather than loading everything.

What's New

Last time you extended Nicola's system with relational traceability — explicit foreign keys with cascade decisions, JOINs that handle empty relationships, cross-practice trace queries. You connected tables and built API endpoints that navigate relationships, plus a scoped practice portal. You worked with a returning client on an existing codebase.

Two things change.

You containerize an application. Docker wraps the entire environment — OS, runtime, dependencies, configuration — into a single unit that runs the same everywhere. When Raj pushes changes, the live system doesn't go down. If something breaks, you restart the container in seconds instead of days.

You plan before you prompt. The sequence matters: backend container before frontend, because the frontend depends on the API. You decide what Claude needs to know for each task and what to leave out. This is the first project where how you direct AI is as important as what you direct it to build. Professional developers report that over-reliance on AI erodes their own problem-solving ability over time. Planning before prompting is one defense — it keeps you thinking about the work, not just delegating it.

The hard part is the Dockerfile. AI generates Dockerfiles that use floating version tags, run as root, copy unnecessary files into the image, and skip basic security practices. Every one of those defaults works today and breaks unpredictably tomorrow. You catch them, and you understand why they matter.

Tools

  • Claude Code — AI coding agent, VS Code extension. Primary tool.
  • Git and GitHub — version control, remote repo, issues, project board.
  • VS Code with Claude Code extension.
  • Docker — containerization. New in this project.
  • React (Vite) — the existing frontend. Continuing.
  • Express.js — the existing backend. Continuing.
  • PostgreSQL — the existing database. Continuing.
  • Tailwind CSS — continuing.
  • Chrome DevTools — continuing.
  • Vercel CLI — deployment comparison. Continuing.

Materials

  • Pemba's WhatsApp messages — the problem, in his words. Enough to start, not enough to build. You ask him the rest.
  • Starter application — Pemba's existing booking system. React frontend, Express backend, PostgreSQL database. It works. Your job is to containerize it.
  • Docker guide — Dockerfile syntax, the layer model, base images, build context. Reference, not a tutorial.
  • Planning templates — for updating the PRD, planning the work sequence, and creating tickets.
  • Deployment comparison — Docker vs Vercel. What each gives you, what each costs.
  • CLAUDE.md — project governance file with the ticket list, tech stack, and how to check the work.
Materials · 35 files
Start Project 5

You work at a computer with a terminal. Signed in, your place is saved.