ping·aiCSTU · CSE 642 · Foundations · Docker Desktop
Part A · The big picture and the words

Why Docker Desktop

Run a project in a sealed box, the same way on every computer.

The old problem“It works on my machine.”Laptops, test servers and production each had different operating systems, language versions and libraries. A project that ran for one person broke for the next.
Where it hurt in the development lifecycleSetup, testing, shipping, runningNew teammates lost days installing the right versions. Bugs showed up only on the server. Fixing them meant guessing what was different.
What a container changesPackage the app with what it needsOne image holds the program, its libraries and its settings. The same image runs on your laptop, in testing and on a server.
Why not a virtual machine?Lighter and faster to startA virtual machine carries a whole operating system. A container shares the host's operating system kernel, so it starts in seconds and uses far less memory.

For you: Docker Desktop is the app that runs these containers on your computer. docker compose up starts the same environment as everyone else, so setup stops being the hard part.

Slide 1 of 14

Read this deck as an article

The same content as the slides above, in one page.

Why Docker Desktop

Run a project in a sealed box, the same way on every computer.

The old problem
“It works on my machine.” Laptops, test servers and production each had different operating systems, language versions and libraries. A project that ran for one person broke for the next.
Where it hurt in the development lifecycle
Setup, testing, shipping, running New teammates lost days installing the right versions. Bugs showed up only on the server. Fixing them meant guessing what was different.
What a container changes
Package the app with what it needs One image holds the program, its libraries and its settings. The same image runs on your laptop, in testing and on a server.
Why not a virtual machine?
Lighter and faster to start A virtual machine carries a whole operating system. A container shares the host's operating system kernel, so it starts in seconds and uses far less memory.

For you: Docker Desktop is the app that runs these containers on your computer. docker compose up starts the same environment as everyone else, so setup stops being the hard part.

Two places you type

A terminal takes exact commands. A Coding Agent App takes plain-language prompts.

The Terminal

A text window where you type exact commands. The shell inside it runs each command the moment you press Enter.

  • Spelling and spacing must be exact.
  • macOS and Linux use zsh or bash. Upper and lower case matter there: Git is not git.
  • Windows uses PowerShell. It does not care about case in command names, but type them as shown anyway.
  • Names inside a command, such as Linux file paths, branch names and image names, can be case-sensitive in any shell.
  • The two kinds of shell have different commands: ls -la works in zsh and bash, while PowerShell uses Get-ChildItem -Force.

Terminal command, macOS and Linux (zsh or bash, case-sensitive): ls -la

Terminal command, Windows PowerShell (command names are not case-sensitive): Get-ChildItem -Force

A Coding Agent App

It looks like a chatbot, but it does much more: it can read your project files, run commands, edit code and use tools, and it often asks your permission first. Product names and features change fast and differ a lot, so these decks use one group name for all of them.

Examples: Kiro, Claude Code Desktop, GitHub Copilot's desktop app, Google Antigravity, the Codex and ChatGPT desktop apps, OpenCode, Hermes, LangChain's Deep Agents desktop app, and others. Which one you use does not matter here.

  • Plain language is fine. Say what you want, and use the right names for things.
  • Capital letters and small slips are forgiving; the meaning is what counts.
  • It may run terminal commands for you. Read what it proposes, especially anything that deletes files or sends data.
  • Pasting a command into the prompt does not guarantee it runs as typed. Ask for the result you want, or ask the app to explain the command first.
Prompt for a Coding Agent App: “What changed in my project since the last commit? Explain it in plain words.”

The same job, two ways

Terminal command, Any shell: git status

In a terminal you type the exact command. In a Coding Agent App you describe what you want.

The anatomy: what is on your computer

Six pieces. You will meet each of them in the next slides.

Docker Desktop
The app you install A window, the engine, the docker command and Compose in one package for macOS and Windows.
Docker Engine (daemon)
The background service that does the work It builds images and runs containers. Nothing works if it is not running.
The docker command
What you type docker and docker compose send requests to the engine and print what comes back.
A small Linux machine
Hidden inside Docker Desktop Containers need Linux. On macOS and Windows, Docker Desktop runs one for you, and your containers run inside it.
Containers
Isolated programs Each sees its own files and network, but shares the Linux kernel of that small machine.
A registry
Where images are stored Docker Hub is the best known. Docker downloads (pulls) images from a registry.

You talk to the docker command, the command talks to the engine, and the engine runs your containers.

From recipe to running container

The path every container takes, from a text file to a running program.

1 · Dockerfile
The recipe A text file listing the steps: start from a base, add files, install libraries, set the start command.
2 · Build
docker build or compose up --build The engine follows the recipe, one step at a time.
3 · Image
The finished package Read-only and made of layers. Docker reuses a layer that did not change, which is why the second start is faster.
4 · Run
docker run or docker compose up Start a container from an image, with its ports, volumes and settings.
5 · Container
The running program Stop it and it is gone. Anything you want to keep belongs in a volume.
6 · Registry
Share or download images Push an image so others can pull it, or pull one built by someone else instead of building it.

Many projects skip steps 1 to 3: they pull a ready-made image, such as a database, and only run it.

Six words, part 1

Each card gives the word, what it means, and a sentence you can say to a Coding Agent App.

Image
A read-only package holding a program and its files. You start containers from it.
Prompt for a Coding Agent App: “Which image does this project start from?”
Container
A running copy of an image. Stop it and it is gone unless you saved data in a volume.
Prompt for a Coding Agent App: “Why did my container stop right after it started?”
Dockerfile
A text file with the steps to build an image.
Prompt for a Coding Agent App: “Explain this Dockerfile line by line.”
Docker Compose
A tool that starts one or more containers together from a single file.
Prompt for a Coding Agent App: “Add a second service to my Compose file.”

Six words, part 2

Volume
Storage Docker keeps outside a container so files survive when the container is removed.
Prompt for a Coding Agent App: “Which folders in this project are volumes?”
Port
A numbered door on your computer. A program listens on a port; a browser connects to it.
Prompt for a Coding Agent App: “Which host port does this app use, and how do I change it?”
Daemon
The background Docker service. Docker Desktop starts it; if it is not running, Docker commands fail.
Prompt for a Coding Agent App: “Docker says it cannot connect to the daemon. What do I check?”
Registry
A place that stores images, such as Docker Hub. Docker downloads (pulls) images from it.
Prompt for a Coding Agent App: “Where is this image pulled from?”

localhost means this computer. localhost:3000 reaches the program listening on port 3000 on your own machine.

Image or container?

People mix these up. A recipe is not a meal.

Image
The recipe and ingredients Fixed. Downloaded or built once. Many containers can start from one image.
Container
The meal you cooked from it Running now. You can start, stop and delete it without changing the image.

Wrong word, right word: “the Docker I started” is a container; “the Docker file I downloaded” is an image or a Dockerfile.

The commands you will use

Run them in a terminal, inside the project folder.

Terminal command, Any shell: docker run hello-world

Check that Docker works Downloads a tiny image and prints a welcome message.

Terminal command, Any shell: docker compose up

Start the project Builds if needed, then runs every service in the Compose file. Ctrl+C stops it.

Terminal command, Any shell: docker compose up -d

Start it in the background You get your terminal back. Use docker compose logs -f to watch the output.

Terminal command, Any shell: docker ps

List running containers Shows names, ports and health. Add -a to include stopped ones.

Terminal command, Any shell: docker compose down

Stop and remove the containers Your code and volumes stay.

Terminal command, Any shell: docker compose down -v

Also delete the volumes Use it to start fresh. Data stored in those volumes is lost.

Reading a Compose file

You do not have to write one. You should be able to find these five things.

  • services: each entry is one program to run, for example dev or db.
  • image or build: where the service comes from. image downloads a ready-made one; build makes one from a Dockerfile.
  • ports: “127.0.0.1:3000:3000” means this computer's port 3000 is connected to port 3000 inside the container.
  • volumes: folders shared with the container or kept by Docker, so edits show up and data survives.
  • environment and command: settings the program reads, and the command it runs when it starts.

Ask your AI: “Explain each service in this docker-compose.yml and which port I open in my browser.”

Ports and localhost

Host port
The port on your computer The first number in 3000:8000. This is the one you type in the browser.
Container port
The port inside the container The second number. The program listens here.
127.0.0.1
Only this computer Binding to 127.0.0.1 keeps the app off your network. Other people on your Wi-Fi cannot reach it.

“Port is already allocated” means another program uses that host port. Pick a different host port instead of stopping unknown programs.

Docker Desktop settings that matter

Memory
Give Docker 6–8 GB if your computer has 16 GB Settings → Resources. Too little and containers crash; too much slows your other apps.
Disk
Images and caches grow over time docker system df shows the space used. docker system prune removes unused data after you confirm.
Start-up
Open Docker Desktop first Wait until it says it is running before you run a Docker command.
Updates
Keep it current A current Docker Desktop includes Compose.

Common problems and the words to use

Cannot connect to the Docker daemon
Docker Desktop is not running Open it, wait for “running”, try again.
Port is already allocated
That host port is taken Change the host port in the Compose file or an environment variable.
EACCES: permission denied
A volume has the wrong owner Run docker compose down -v, then docker compose up. Tell your Coding Agent App the full error text.
No space left on device
Docker's disk is full Check docker system df, then docker system prune.
Slow first start
Images are downloading Wait for healthy in docker compose ps. Later starts are fast.
Edits do not show up
File changes were not noticed Wait a few seconds, reload, and ask whether file watching needs polling on your system.

Say it to your Coding Agent App

Name the thing correctly and paste the exact error. You get better answers.

Prompt for a Coding Agent App: “Explain this docker-compose.yml: which services start and which port do I open?”
Prompt for a Coding Agent App: “docker compose up fails with: <paste the exact error>. What does it mean and what is the smallest fix?”
Prompt for a Coding Agent App: “Change the host port from 3000 to 3100 and tell me the new address.”
Prompt for a Coding Agent App: “Show me how to delete this project's containers and volumes and start clean.”
  • Never paste keys or passwords into a prompt.

Learn more from the source

Checked against the official documentation on 7 November 2026.

  • Docker's own beginner guide explains containers and images with examples.
  • The Docker Desktop manual covers settings, resources and updates.
  • The Compose documentation lists every key in a Compose file.