Docker
This chapter explains image construction as a cacheable filesystem graph and container execution as a constrained process, then builds reproducible multi-service development and production configurations.
- Explain Dockerfile & multi-stage builds by naming its input, guarantee, internal lifecycle, important failure, and proof.
- Explain Docker Compose by naming its input, guarantee, internal lifecycle, important failure, and proof.
- Explain Networking, storage & sizing by naming its input, guarantee, internal lifecycle, important failure, and proof.
- Trace the chapter's complete execution path and identify where memory, I/O, concurrency, persistence, or rendering cost accumulates.
- Build the worked example, make one failure visible, and defend the design in a review.
How to use this chapter
For Docker, read the explanations first and predict every example before running it. Keep a learning repository containing code, tests, command output, and the short written submission. The roadmap checklist at the end audits coverage; the chapter itself follows the operations learning arc appropriate to this subject.
The problem this chapter solves
This chapter explains image construction as a cacheable filesystem graph and container execution as a constrained process, then builds reproducible multi-service development and production configurations.
Automation reduces configuration drift and makes deployments, rollbacks, capacity, permissions, and incident response reproducible.
Learning outcomes
- Explain Dockerfile & multi-stage builds by naming its input, guarantee, internal lifecycle, important failure, and proof.
- Explain Docker Compose by naming its input, guarantee, internal lifecycle, important failure, and proof.
- Explain Networking, storage & sizing by naming its input, guarantee, internal lifecycle, important failure, and proof.
- Trace the chapter's complete execution path and identify where memory, I/O, concurrency, persistence, or rendering cost accumulates.
- Build the worked example, make one failure visible, and defend the design in a review.
Chapter progression
The order below is intentional: later sections depend on guarantees established earlier.
Runtime or system overview
A container is an isolated process using kernel namespaces and cgroups, not a virtual machine. Kubernetes controllers continuously compare desired and observed state. CI runners execute an immutable workflow revision. Observability correlates metrics, logs, and traces across those layers. In Docker, use that execution model to decide where the chapter's validation, state ownership, cleanup, and evidence belong.
Execution trace
- A versioned manifest or workflow is parsed and validated, and authentication plus authorization determines which control-plane operations are allowed.
- The platform records desired state; controllers, runners, or cloud services reconcile it by creating artifacts, workloads, routes, identities, and telemetry pipelines.
- Readiness and health gates control traffic while resource requests, limits, quotas, pools, and autoscaling signals bound capacity.
- A failed rollout, hook, job, or health condition follows the documented retry, pause, rollback, or incident path without changing immutable artifact identity.
- Deployment verification checks the user path, version/digest, metrics, logs, traces, alerts, permissions, and recovery procedure rather than only command exit status.
Memory and performance lens
Resource requests drive scheduling; limits constrain cgroups and may trigger throttling or OOM termination. Build layers, image caches, log buffers, telemetry cardinality, and unbounded queues consume storage or memory even when application code appears stable. For Docker, connect those costs to the concrete operations in the topic sections rather than assuming the friendly surface syntax is cheap.
When tuning Docker, measure build duration, artifact size, rollout health, CPU/memory saturation, restart/OOM rate, telemetry cardinality, and rollback time rather than optimizing from source-code appearance.
1. Dockerfile & multi-stage builds
The Dockerfile & multi-stage builds unit begins with FROM/RUN/COPY/ADD/WORKDIR/ENV/ARG/EXPOSE/CMD/ENTRYPOINT: A Dockerfile creates immutable image layers; a multi-stage build copies only required artifacts into the runtime image. Copy dependency manifests before source, pin bases by digest where required, and run as non-root. The rest of this section connects that guarantee to this unit's related roadmap concepts instead of treating each term as an isolated flashcard.
Desired state and operational contract: Dockerfile & multi-stage builds
| Concept | Meaning | Engineering decision |
|---|---|---|
| FROM/RUN/COPY/ADD/WORKDIR/ENV/ARG/EXPOSE/CMD/ENTRYPOINT | A Dockerfile creates immutable image layers; a multi-stage build copies only required artifacts into the runtime image. | Copy dependency manifests before source, pin bases by digest where required, and run as non-root. |
| COPY vs ADD, CMD vs ENTRYPOINT (exec vs shell form) | A Dockerfile creates immutable image layers; a multi-stage build copies only required artifacts into the runtime image. | Copy dependency manifests before source, pin bases by digest where required, and run as non-root. |
| .dockerignore and layer caching (requirements.txt first) | Environment and dependency tools isolate packages and record the inputs needed to reproduce an installation. | Commit declarative dependencies and a deterministic lock appropriate to the tool. |
| multi-stage: FROM...AS builder + COPY --from=builder | A Dockerfile creates immutable image layers; a multi-stage build copies only required artifacts into the runtime image. | Copy dependency manifests before source, pin bases by digest where required, and run as non-root. |
| 800MB→50MB with distroless/Alpine base images | A Dockerfile creates immutable image layers; a multi-stage build copies only required artifacts into the runtime image. | Copy dependency manifests before source, pin bases by digest where required, and run as non-root. |
What the platform reconciles: Dockerfile & multi-stage builds
FROM/RUN/COPY/ADD/WORKDIR/ENV/ARG/EXPOSE/CMD/ENTRYPOINT. Each instruction produces cache metadata and usually a filesystem layer. ENTRYPOINT defines the executable contract; CMD supplies defaults. A container starts one process in isolated namespaces and cgroups.
COPY vs ADD, CMD vs ENTRYPOINT (exec vs shell form). Each instruction produces cache metadata and usually a filesystem layer. ENTRYPOINT defines the executable contract; CMD supplies defaults. A container starts one process in isolated namespaces and cgroups.
.dockerignore and layer caching (requirements.txt first). A virtual environment changes interpreter and script paths; resolvers choose compatible distributions; a lock or compiled requirements file records exact transitive versions.
multi-stage: FROM...AS builder + COPY --from=builder. Each instruction produces cache metadata and usually a filesystem layer. ENTRYPOINT defines the executable contract; CMD supplies defaults. A container starts one process in isolated namespaces and cgroups.
800MB→50MB with distroless/Alpine base images. Each instruction produces cache metadata and usually a filesystem layer. ENTRYPOINT defines the executable contract; CMD supplies defaults. A container starts one process in isolated namespaces and cgroups.
Read these as one system: FROM/RUN/COPY/ADD/WORKDIR/ENV/ARG/EXPOSE/CMD/ENTRYPOINT establishes the starting contract, COPY vs ADD, CMD vs ENTRYPOINT (exec vs shell form) changes how that contract is executed or represented, and 800MB→50MB with distroless/Alpine base images exposes a later boundary or failure condition. A local optimization is useful only when the combined behavior stays correct and observable.
Configuration with an observable result: Dockerfile & multi-stage builds
1FROM python:3.12-slim AS runtime2WORKDIR /app3COPY --from=builder /opt/venv /opt/venv4USER 100015CMD ["python", "-m", "app"]This Dockerfile & multi-stage builds slice makes FROM/RUN/COPY/ADD/WORKDIR/ENV/ARG/EXPOSE/CMD/ENTRYPOINT observable. Read it from the boundary inward: identify the input, the validation point, the state or operation, and the value that proves the result. Before extending it toward 800MB→50MB with distroless/Alpine base images, predict its behavior for empty, invalid, repeated, and large input.
Failure and security boundaries: Dockerfile & multi-stage builds
| Risk | Why it matters |
|---|---|
| FROM/RUN/COPY/ADD/WORKDIR/ENV/ARG/EXPOSE/CMD/ENTRYPOINT | Alpine is not automatically smaller after native build dependencies and may introduce musl compatibility issues. |
| COPY vs ADD, CMD vs ENTRYPOINT (exec vs shell form) | Alpine is not automatically smaller after native build dependencies and may introduce musl compatibility issues. |
| .dockerignore and layer caching (requirements.txt first) | pip freeze captures the current environment, including accidental packages; it is not always a clean dependency design. |
| multi-stage: FROM...AS builder + COPY --from=builder | Alpine is not automatically smaller after native build dependencies and may introduce musl compatibility issues. |
| 800MB→50MB with distroless/Alpine base images | Alpine is not automatically smaller after native build dependencies and may introduce musl compatibility issues. |
Operations drill: Dockerfile & multi-stage builds
- Foundation: implement or demonstrate FROM/RUN/COPY/ADD/WORKDIR/ENV/ARG/EXPOSE/CMD/ENTRYPOINT with one valid input and one invalid input. Record the exact output or failure.
- Integration: combine FROM/RUN/COPY/ADD/WORKDIR/ENV/ARG/EXPOSE/CMD/ENTRYPOINT with COPY vs ADD, CMD vs ENTRYPOINT (exec vs shell form). Explain which component owns validation and cleanup.
- Production: design a test or experiment that exposes the failure described for 800MB→50MB with distroless/Alpine base images. State the metric, assertion, or query plan that proves the correction.
What a strong checkpoint answer contains
- A precise boundary and typed or validated input.
- One named guarantee, not only a library call.
- A negative case that fails for the intended reason.
- Cleanup, transaction, retry, or cancellation behavior where applicable.
- Evidence: assertion, command output, plan, trace, metric, or accessible UI state.
2. Docker Compose
The Docker Compose unit begins with services/networks/volumes configuration: Compose declares a local multi-container application, its networks, volumes, configuration, and health dependencies. Keep production-like topology but separate development overrides and secrets. The rest of this section connects that guarantee to this unit's related roadmap concepts instead of treating each term as an isolated flashcard.
Desired state and operational contract: Docker Compose
| Concept | Meaning | Engineering decision |
|---|---|---|
| services/networks/volumes configuration | Compose declares a local multi-container application, its networks, volumes, configuration, and health dependencies. | Keep production-like topology but separate development overrides and secrets. |
| depends_on with condition: service_healthy + healthcheck | Compose declares a local multi-container application, its networks, volumes, configuration, and health dependencies. | Keep production-like topology but separate development overrides and secrets. |
| env_file and named vs bind mount vs tmpfs volumes | Compose declares a local multi-container application, its networks, volumes, configuration, and health dependencies. | Keep production-like topology but separate development overrides and secrets. |
| profiles for optional services | Compose declares a local multi-container application, its networks, volumes, configuration, and health dependencies. | Keep production-like topology but separate development overrides and secrets. |
| docker-compose.override.yml for dev overrides | Compose declares a local multi-container application, its networks, volumes, configuration, and health dependencies. | Keep production-like topology but separate development overrides and secrets. |
What the platform reconciles: Docker Compose
services/networks/volumes configuration. Service names become DNS records on a Compose network. Named volumes outlive containers; bind mounts expose host paths. Health-aware dependency ordering does not guarantee application migrations are complete.
depends_on with condition: service_healthy + healthcheck. Service names become DNS records on a Compose network. Named volumes outlive containers; bind mounts expose host paths. Health-aware dependency ordering does not guarantee application migrations are complete.
env_file and named vs bind mount vs tmpfs volumes. Service names become DNS records on a Compose network. Named volumes outlive containers; bind mounts expose host paths. Health-aware dependency ordering does not guarantee application migrations are complete.
profiles for optional services. Service names become DNS records on a Compose network. Named volumes outlive containers; bind mounts expose host paths. Health-aware dependency ordering does not guarantee application migrations are complete.
docker-compose.override.yml for dev overrides. Service names become DNS records on a Compose network. Named volumes outlive containers; bind mounts expose host paths. Health-aware dependency ordering does not guarantee application migrations are complete.
Read these as one system: services/networks/volumes configuration establishes the starting contract, depends_on with condition: service_healthy + healthcheck changes how that contract is executed or represented, and docker-compose.override.yml for dev overrides exposes a later boundary or failure condition. A local optimization is useful only when the combined behavior stays correct and observable.
Configuration with an observable result: Docker Compose
1async def get_session():2 async with session_factory() as session:3 yield sessionThis Docker Compose slice makes services/networks/volumes configuration observable. Read it from the boundary inward: identify the input, the validation point, the state or operation, and the value that proves the result. Before extending it toward docker-compose.override.yml for dev overrides, predict its behavior for empty, invalid, repeated, and large input.
Failure and security boundaries: Docker Compose
| Risk | Why it matters |
|---|---|
| services/networks/volumes configuration | depends_on is not a distributed readiness protocol. |
| depends_on with condition: service_healthy + healthcheck | depends_on is not a distributed readiness protocol. |
| env_file and named vs bind mount vs tmpfs volumes | depends_on is not a distributed readiness protocol. |
| profiles for optional services | depends_on is not a distributed readiness protocol. |
| docker-compose.override.yml for dev overrides | depends_on is not a distributed readiness protocol. |
Operations drill: Docker Compose
- Foundation: implement or demonstrate services/networks/volumes configuration with one valid input and one invalid input. Record the exact output or failure.
- Integration: combine services/networks/volumes configuration with depends_on with condition: service_healthy + healthcheck. Explain which component owns validation and cleanup.
- Production: design a test or experiment that exposes the failure described for docker-compose.override.yml for dev overrides. State the metric, assertion, or query plan that proves the correction.
What a strong checkpoint answer contains
- A precise boundary and typed or validated input.
- One named guarantee, not only a library call.
- A negative case that fails for the intended reason.
- Cleanup, transaction, retry, or cancellation behavior where applicable.
- Evidence: assertion, command output, plan, trace, metric, or accessible UI state.
3. Networking, storage & sizing
The Networking, storage & sizing unit begins with bridge/host/none/overlay/macvlan network types: Docker network drivers choose a container's connectivity model: bridge provides host-local virtual networking, host shares the host stack, none removes normal networking, overlay spans compatible nodes, and macvlan gives link-layer identities. Use user-defined bridge networks for local multi-container apps and select other drivers only from explicit isolation, performance, or multi-host requirements. The rest of this section connects that guarantee to this unit's related roadmap concepts instead of treating each term as an isolated flashcard.
Desired state and operational contract: Networking, storage & sizing
| Concept | Meaning | Engineering decision |
|---|---|---|
| bridge/host/none/overlay/macvlan network types | Docker network drivers choose a container's connectivity model: bridge provides host-local virtual networking, host shares the host stack, none removes normal networking, overlay spans compatible nodes, and macvlan gives link-layer identities. | Use user-defined bridge networks for local multi-container apps and select other drivers only from explicit isolation, performance, or multi-host requirements. |
| embedded DNS and service discovery | A service boundary owns a cohesive domain model and data, while communication contracts expose only what other contexts need. | Split by business ownership and independent change, not by technical layer. |
| named/bind/tmpfs volume lifecycle | Named volumes are Docker-managed persistent data, bind mounts expose a chosen host path, and tmpfs stores ephemeral data in host memory. | Use named volumes for portable service data, bind mounts for deliberate development/source integration, and tmpfs for bounded sensitive or disposable runtime files. |
| Python wheel builder and distroless runtime | A multi-stage build compiles Python dependencies into wheels in a tool-rich builder and copies only the installed runtime plus application into a minimal distroless-style image. | Pin bases by digest, build wheels reproducibly, run as non-root, include certificates/timezone data only when needed, and scan the final image. |
| image history and size budget below 150MB | An image size budget limits pull time, storage, cold start, and attack surface; image history reveals which build instruction introduced each immutable layer. | Use .dockerignore, multi-stage builds, no-cache package installs, wheel/runtime separation, and docker history or layer-analysis tools to enforce the measured budget. |
What the platform reconciles: Networking, storage & sizing
bridge/host/none/overlay/macvlan network types. Docker creates namespaces, virtual interfaces, routes, DNS/service records, and firewall/NAT rules according to the driver. Published ports forward from a host interface; container ports alone do not publish externally.
embedded DNS and service discovery. Synchronous calls couple availability and latency; events couple schemas and ordering; discovery maps logical names to healthy instances. Strangler migration diverts one capability at a time from a monolith.
named/bind/tmpfs volume lifecycle. The runtime mounts the selected source into the container namespace before process start. Image-layer content at that path is obscured; volume lifecycle is independent of a replaced container unless explicitly removed.
Python wheel builder and distroless runtime. Docker caches builder layers, wheel metadata records compatible Python/ABI/platform tags, and the final stage omits compilers and shells. Native wheels must match the runtime libc and architecture.
image history and size budget below 150MB. Layer contents remain in history even if a later layer deletes them. Build context, package caches, debug symbols, duplicated artifacts, and base-image choice determine compressed and extracted sizes.
Read these as one system: bridge/host/none/overlay/macvlan network types establishes the starting contract, embedded DNS and service discovery changes how that contract is executed or represented, and image history and size budget below 150MB exposes a later boundary or failure condition. A local optimization is useful only when the combined behavior stays correct and observable.
Failure and security boundaries: Networking, storage & sizing
| Risk | Why it matters |
|---|---|
| bridge/host/none/overlay/macvlan network types | Host networking removes port namespace isolation, overlay adds control-plane requirements, and publishing databases on all interfaces can expose them beyond the project. |
| embedded DNS and service discovery | A shared database preserves hidden coupling and distributed chatty calls create a network monolith. |
| named/bind/tmpfs volume lifecycle | Deleting a container does not necessarily delete its volume, while a broad bind mount can let a compromised process modify host files. |
| Python wheel builder and distroless runtime | Copying a virtual environment across incompatible base distributions or omitting required shared libraries produces imports that fail only at runtime. |
| image history and size budget below 150MB | Deleting a secret or large file in a later RUN does not remove it from the earlier layer and can leave both size and exposure intact. |
Operations drill: Networking, storage & sizing
- Foundation: implement or demonstrate bridge/host/none/overlay/macvlan network types with one valid input and one invalid input. Record the exact output or failure.
- Integration: combine bridge/host/none/overlay/macvlan network types with embedded DNS and service discovery. Explain which component owns validation and cleanup.
- Production: design a test or experiment that exposes the failure described for image history and size budget below 150MB. State the metric, assertion, or query plan that proves the correction.
What a strong checkpoint answer contains
- A precise boundary and typed or validated input.
- One named guarantee, not only a library call.
- A negative case that fails for the intended reason.
- Cleanup, transaction, retry, or cancellation behavior where applicable.
- Evidence: assertion, command output, plan, trace, metric, or accessible UI state.
Complete worked example
This example integrates the chapter rather than demonstrating an isolated method.
1FROM python:3.12-slim AS builder2ENV VIRTUAL_ENV=/opt/venv3RUN python -m venv $VIRTUAL_ENV4COPY requirements.txt .5RUN $VIRTUAL_ENV/bin/pip install --no-cache-dir -r requirements.txt6
7FROM python:3.12-slim AS runtime8ENV PATH=/opt/venv/bin:$PATH PYTHONUNBUFFERED=19RUN addgroup --system app && adduser --system --ingroup app app10WORKDIR /app11COPY --from=builder /opt/venv /opt/venv12COPY --chown=app:app app ./app13USER app14EXPOSE 800015CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000"]Expected result
1The runtime image contains the virtual environment and application but no compiler or root process.Line-by-line reading
| Line | Code | Explanation |
|---|---|---|
| 1 | FROM python:3.12-slim AS builder | Adds a relational selection, combination, ordering, bound, or returned-value rule to the statement. |
| 2 | ENV VIRTUAL_ENV=/opt/venv | Computes or receives a value and binds it for the next step; the referenced object remains separate from the name. |
| 3 | RUN python -m venv $VIRTUAL_ENV | Implements the next dockerfile statement in the example's data flow. |
| 4 | COPY requirements.txt . | Begins a declarative database or protocol operation; subsequent lines refine its contract. |
| 5 | RUN $VIRTUAL_ENV/bin/pip install --no-cache-dir -r requirements.txt | Implements the next dockerfile statement in the example's data flow. |
| 7 | FROM python:3.12-slim AS runtime | Adds a relational selection, combination, ordering, bound, or returned-value rule to the statement. |
| 8 | ENV PATH=/opt/venv/bin:$PATH PYTHONUNBUFFERED=1 | Computes or receives a value and binds it for the next step; the referenced object remains separate from the name. |
| 9 | RUN addgroup --system app && adduser --system --ingroup app app | Implements the next dockerfile statement in the example's data flow. |
| 10 | WORKDIR /app | Implements the next dockerfile statement in the example's data flow. |
| 11 | COPY --from=builder /opt/venv /opt/venv | Begins a declarative database or protocol operation; subsequent lines refine its contract. |
| 12 | COPY --chown=app:app app ./app | Begins a declarative database or protocol operation; subsequent lines refine its contract. |
| 13 | USER app | Implements the next dockerfile statement in the example's data flow. |
| 14 | EXPOSE 8000 | Implements the next dockerfile statement in the example's data flow. |
| 15 | CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000"] | Implements the next dockerfile statement in the example's data flow. |
Step-by-step execution
- A versioned manifest or workflow is parsed and validated, and authentication plus authorization determines which control-plane operations are allowed.
- The platform records desired state; controllers, runners, or cloud services reconcile it by creating artifacts, workloads, routes, identities, and telemetry pipelines.
- Readiness and health gates control traffic while resource requests, limits, quotas, pools, and autoscaling signals bound capacity.
- A failed rollout, hook, job, or health condition follows the documented retry, pause, rollback, or incident path without changing immutable artifact identity.
- Deployment verification checks the user path, version/digest, metrics, logs, traces, alerts, permissions, and recovery procedure rather than only command exit status.
Common mistakes and professional corrections
| Area | Common failure | Better engineering choice |
|---|---|---|
| Dockerfile & multi-stage builds | Alpine is not automatically smaller after native build dependencies and may introduce musl compatibility issues. | Copy dependency manifests before source, pin bases by digest where required, and run as non-root. |
| Docker Compose | depends_on is not a distributed readiness protocol. | Keep production-like topology but separate development overrides and secrets. |
| Networking, storage & sizing | Host networking removes port namespace isolation, overlay adds control-plane requirements, and publishing databases on all interfaces can expose them beyond the project. | Use user-defined bridge networks for local multi-container apps and select other drivers only from explicit isolation, performance, or multi-host requirements. |
Interview and review notes
- Define the central abstraction without naming a library function.
- Trace one request, call, query, message, render, or state transition from input to observable result.
- Compare two alternatives from this chapter by guarantee, cost, and failure behavior.
- Explain the most likely production bug and the test or metric that reveals it.
- State what remains authoritative after process loss, retry, reconnect, or deployment.
Practice set
Easy
- Define every bold term in the concept tables in one precise sentence.
- Reproduce the focused examples and annotate the value or state after each important line.
- Explain the chapter progression diagram aloud in two minutes.
Medium
- Replace one convenient default with an explicit policy for validation, timeout, ordering, pagination, cleanup, or error handling.
- Write a negative test for each topic group.
- Compare the measured behavior before and after one justified change.
Hard
- Combine all topic groups into one thin vertical slice.
- Inject a realistic failure at the most important external boundary and prove recovery.
- Write a one-page design note covering ownership, trade-offs, security, observability, and rollback.
Chapter submission
Submit:
- source code or reproducible commands;
- automated tests plus one deliberately failing-before-fix test;
- captured output, query plan, trace, screenshot, or metric;
- a 300–500 word explanation of the execution flow and one rejected alternative;
- a short README with setup, versions, limitations, and cleanup steps.
- Continue with the Dockerized FastAPI Stack project workshop.
Self-review rubric
| Dimension | Beginning | Competent | Professional |
|---|---|---|---|
| Explanation | Names APIs | Explains behavior | Connects guarantees, internals, and trade-offs |
| Implementation | Happy path only | Validated and tested | Clear ownership, failure recovery, and cleanup |
| Evidence | Manual claim | Repeatable output | Tests plus meaningful measurement or inspection |
| Communication | Steps missing | Reproducible README | Decisions, limits, and alternatives are explicit |
Roadmap coverage checklist
- To do: Dockerfile & multi-stage builds: FROM/RUN/COPY/ADD/WORKDIR/ENV/ARG/EXPOSE/CMD/ENTRYPOINT
- To do: Dockerfile & multi-stage builds: COPY vs ADD, CMD vs ENTRYPOINT (exec vs shell form)
- To do: Dockerfile & multi-stage builds: .dockerignore and layer caching (requirements.txt first)
- To do: Dockerfile & multi-stage builds: multi-stage: FROM...AS builder + COPY --from=builder
- To do: Dockerfile & multi-stage builds: 800MB→50MB with distroless/Alpine base images
- To do: Docker Compose: services/networks/volumes configuration
- To do: Docker Compose: depends_on with condition: service_healthy + healthcheck
- To do: Docker Compose: env_file and named vs bind mount vs tmpfs volumes
- To do: Docker Compose: profiles for optional services
- To do: Docker Compose: docker-compose.override.yml for dev overrides
- To do: Networking, storage & sizing: bridge/host/none/overlay/macvlan network types
- To do: Networking, storage & sizing: embedded DNS and service discovery
- To do: Networking, storage & sizing: named/bind/tmpfs volume lifecycle
- To do: Networking, storage & sizing: Python wheel builder and distroless runtime
- To do: Networking, storage & sizing: image history and size budget below 150MB
Quick revision
- Dockerfile & multi-stage builds: connect the surface API to its guarantee, lifecycle, failure boundary, and evidence.
- Docker Compose: connect the surface API to its guarantee, lifecycle, failure boundary, and evidence.
- Networking, storage & sizing: connect the surface API to its guarantee, lifecycle, failure boundary, and evidence.
- Re-read the worked-example execution trace instead of memorizing isolated syntax.
- If you cannot name the owner of state and cleanup, the design is not yet complete.
Mastery check
How well can you recall this?
Finished this lesson?