Docker Knowledge Patch
Baseline: Docker Engine 24.x and Compose 2.x. Covered range: Engine 25.0.0 through 29.3, Engine API v1.44 through v1.55, Compose 5.0.0 through 5.3.0, Buildx 0.30.0 through 0.35.0, BuildKit 0.28.0, and Dockerfile 1.22.0.
Included versioned batches: 25.0.0, 26.0.0, 27.0.1, 28.0.0, 0.30.0, 5.0.0, 0.31.0, 5.1.0, 0.28.0, 1.22.0, 0.32.0, 0.33.0, 0.34.0, 0.35.0, 5.2.0, and 5.3.0.
Use this patch
- Identify whether the task targets Engine runtime, networking, images, the Engine API, Go integration, Buildx, BuildKit/Dockerfile, or Compose.
- Read the matching reference before changing configuration, client calls, parsers, or automation.
- Check both the daemon version and negotiated API version; several defaults and response shapes are API-gated.
- Treat fresh installations, upgrades, and downgrades separately. Engine 28 and 29 include stateful storage and firewall transitions.
- Make output parsing explicit. Several human-oriented CLI defaults changed, while event and Compose JSON streams use record framing.
Reference index
| Reference | Topics | | --- | --- | | runtime.md | Daemon startup and reload, storage, mounts, resources, security, rootless, Windows, Swarm, platform support | | networking.md | Attachments, DNS, IPv4/IPv6, IPAM, gateway modes, firewall backends, routing | | images-registry.md | Image store, archives, platform selection, manifests, formats, registry behavior, provenance | | engine-api.md | API compatibility, schema changes, event framing, inspection, updates, deprecations | | go-sdk-cli.md | Go modules and client migrations, removed APIs, CLI behavior and embedding | | buildx.md | Bake, exporters, Imagetools, source policies, builders, provenance, resources | | buildkit-dockerfile.md | BuildKit sources and verification, provenance, deployment, Dockerfile frontend and linting | | compose.md | Compose 5 migration, builds, lifecycle, providers, publish, watch, output, init containers |
Breaking changes and migration priorities
Engine 29 fresh installations
- Fresh Engine 29 installations use the containerd image store by default; upgrades keep their existing store.
userns-remaptemporarily prevents use of the containerd store. - Bundled containerd 2.1.5 follows systemd's
LimitNOFILE, changing the container default from1048576to1024. Set--ulimitordefault-ulimitsfor workloads that require more descriptors.
{
"default-ulimits": {
"nofile": { "Name": "nofile", "Soft": 1048576, "Hard": 1048576 }
}
}
- Do not assume the old image-list table:
docker image lsnow uses a collapsed tree and hides untagged images unless--allis set. Give scripts an explicit--format. - Legacy-link environment variables are no longer injected by default.
DOCKER_KEEP_DEPRECATED_LEGACY_LINKS_ENV_VARS=1is only a temporary compatibility switch.
Firewall and network transitions
- Engine 28.0.0 requires kernel
ipsetsupport and installs redesigned iptables/ip6tables rules. Before downgrading, remove those rules; rebooting is the simplest documented cleanup. - Engine 28.0.0 blocks remote direct routing to unpublished ports and prevents neighboring hosts from reaching ports published to host loopback. Publish required ports or deliberately choose a
nat-unprotectedgateway mode. - Engine 29 removes the
DOCKER-ISOLATION-STAGE-1andDOCKER-ISOLATION-STAGE-2chains. Without the userland proxy, cross-network reachability through host-published ports andnat-unprotectednetworks can increase. - The nftables backend is experimental. Docker does not enable host forwarding in this mode; configure forwarding and non-Docker interface policy yourself.
- IPv6
ip6tablesfiltering became stable and default-enabled in 27.0.1. A host that enables IPv6 forwarding independently owns itsFORWARDpolicy.
API compatibility and response parsing
- Engine 25.0.0 API v1.44 removes image
VirtualSize; Engine 26.0.0 removes API versions below v1.24 and imageContainer/ContainerConfigfields. - Engine 29.0 through 29.2 require daemon API v1.44 or newer; 29.3 lowers the raw daemon floor to v1.40. The v29 CLI and Go client still do not negotiate below v1.44.
- API v1.52 removes many top-level container network fields, omits unset image fields, and can omit
GraphDriverwith the containerd backend. Read per-network data fromNetworkSettings.Networksand tolerate absent optional fields. - API v1.53 removes the legacy
/system/dfarrays in favor of usage summaries and deprecates/grpcand/session. - API v1.55 adds image attestations and makes per-device block-I/O update fields live. Distinguish omitted or
nullupdate fields from empty arrays, which clear rules. - Negotiate event framing explicitly: NDJSON is declared in v1.52, RFC 7464
application/json-seqis accepted in v1.52, andapplication/jsonlis accepted in v1.53.
Image and registry removals
- Engine 28.2 cannot pull or push Docker Image v1 or manifest v2 schema 1. Republish content as OCI or manifest v2 schema 2.
- Engine 28.2 also removes pull-by-tag fallback after digest resolution. Registries must conform to the OCI Distribution Specification.
- Engine 27 and later reject a non-local remote TCP listener configured with explicit
--tls=falseor--tlsverify=false. Use verified TLS, a Unix socket, or SSH. - Engine 29 removes Docker Content Trust commands and classic-builder DCT support from the CLI; install the trust command separately as a CLI plugin when needed.
Go SDK and CLI integration
- Stop importing
github.com/docker/docker. Usegithub.com/moby/moby/clientandgithub.com/moby/moby/api; the parentgithub.com/moby/mobymodule is internal, release tags usedocker-v29.0.0form, and the SDK requires Go 1.24 or newer. - Replace removed
NewClientandNewEnvClient; replaceImageCreatewithImagePullorImageImport. - Expect option structs and dedicated result structs instead of positional parameters and raw returns.
ContainerExec...methods becomeExec..., while pull/push results exposeJSONMessagesiterators. - Migrate IP/subnet values to
netip.Addrandnetip.Prefix, MAC values to byte slices compatible withnet.HardwareAddr, and containerPorttoPortSummary. - Docker CLI embedding lost most exported stock-command constructors and many formatter and
Run...helpers. Build on the supported client modules or provide a separate command layer.
Compose 5 migration
- Compose intentionally jumps from v2 to v5; v3 and v4 were skipped to avoid confusion with obsolete Compose file format labels.
- Compose 5 removes its internal BuildKit builder and delegates builds to Bake. Remove dependencies on the former internal builder path.
- Compose 5.2.0 introduces a new state-reconciliation algorithm. Regression-test upgrade convergence for existing projects.
docker compose ps --format jsonemits JSON Lines, not one JSON array. Consume each line as a separate JSON value.- Compose 5.3.0 supports native pre-start init containers.
High-use Engine features
Mount image content
Use type=image (since 28.0.0) and optionally select an internal path with image-subpath:
docker run --mount type=image,source=alpine:latest,target=/mnt,image-subpath=etc alpine:latest
Use bind-create-src when a missing bind source should be created. Replace removed bind-nonrecursive with bind-recursive=disabled:
docker run --mount type=bind,src=/host/data,dst=/data,bind-recursive=disabled IMAGE
Anonymous volumes may now be read-only without naming a source.
Select image platforms
- With the containerd image store,
docker image push --platformselects one manifest (since 27.0.1). docker load,docker save, anddocker historygained one-platform selection in 28.0.0.- Engine 29 accepts comma-separated platform lists for
loadandsave; the API accepts repeatedplatformparameters.
docker image save --platform linux/amd64,linux/arm64 -o app.tar app:tag
Control network gateways and address families
Choose the default gateway with extended --network syntax and gw-priority:
docker run --network=name=frontend --network=name=egress,gw-priority=100 IMAGE
Use gateway_mode_ipv4 or gateway_mode_ipv6 values nat, routed, nat-unprotected, or, for an internal network, isolated. Create IPv6-only networks with --ipv6 --ipv4=false where supported.
docker network create --ipv6 --ipv4=false v6-only
Configure per-endpoint interface sysctls with the IFNAME placeholder; API v1.48 no longer migrates container-wide eth0 sysctls automatically.
High-use build features
Enforce source policy
- Buildx 0.31.0 introduces Rego source policy for local contexts; 0.32.0 extends it to Git and HTTP sources and adds Sigstore/provenance inputs.
- Buildx 0.33.0 adds PGP verification and makes the DAP debugger generally available.
- Buildx 0.34.0 adds opt-in
BUILDX_DEFAULT_POLICYverification for Docker pipeline images and globalbake --policyoptions. - Buildx 0.35.0 can proxy build-step network traffic into policy evaluation with BuildKit 0.31.0 or later.
docker buildx build --policy ./policy.rego .
docker buildx bake --policy ./policy.rego
Make outputs and resources deterministic
- Use local exporter
mode=deleteto replace rather than merge the destination. Outside the working directory, allowbuildx.local.deleteexplicitly. - Use
buildx build --resourceor Bake'sresourcekey for CPU and memory limits; this requires BuildKit 0.31.0 or later and Dockerfile v1.25.0 or later. - Use
imagetools create --metadata-fileto capture the created descriptor and digest. - Use Buildx command
--timeoutwhere offered to bound waits for remote builders.
High-use Compose features
- Use
build.no_cache_filterto bypass cache only for named build stages. - Use
docker compose start --waitto wait for services after starting them. - Expect lifecycle hooks on restart,
post_starthooks forcompose run, and provider stop hooks during shutdown. - Compose recreates a container when an image-mounted digest changes.
- OCI and Git remote resources are supported, including overrides for OCI projects and corrected Windows/SSH path handling.
docker compose publishhonors optional missing environment files and checks literal inline environment values for sensitive data.- Compose Watch no longer rebuilds
depends_onservices solely because of that relationship.
Preflight checklist
- Run
dockerd --validate --config-file ...to validate configuration and host requirements. - Verify the active image store and firewall backend with
docker info. - Pin or inspect the Engine API version before relying on fields or omission behavior.
- Make CLI and stream output formats explicit in automation.
- Test firewall reachability after Engine 28/29 upgrades and before any downgrade.
- Test Compose convergence after moving to 5.2.0 or later.
- Read the complete topic reference before changing SDK integrations or compatibility paths.