A new DockerBuildContext service, built over FileSystem and Path, turns a
directory into the tar stream images.build takes, as docker build does: the
Dockerfile's own ignore file or else .dockerignore, read with core's
IgnoreFile.dockerignore and walked with FileSystem.glob; the Dockerfile and
the ignore file always sent, the Dockerfile first for BuildKit; files,
directories and unfollowed symbolic links owned by root. NodeDocker's layers
provide it. A malformed ignore file or a file that fails to read is the new
DockerError reason InvalidBuildContext.
- generate the schemas from moby's api/docs/v1.52.yaml, and drop the pre-1.52 /system/df patch
- send every request at /v1.52 after one unversioned /version check that the Engine serves it;
UnsupportedApiVersion reports the Engine's range and asks to upgrade an old Engine
- remove negotiation, the apiVersion setting, ApiVersions gates and OptionNotSupported
- accept DOCKER_API_VERSION only as 1.52
- remove post-1.52 surface: image attestations, the images identity query, keep-storage; events as x-ndjson
- DockerConfig hashes context names with effect/crypto's Digest, after main replaced effect/Crypto
- docs, codegen notes and the changeset state the fixed support policy
DockerConfig.layerFromEnv takes a homeVariable option, HOME by default, for
the config directory when DOCKER_CONFIG is unset. NodeDocker.layerFromEnv
passes USERPROFILE on Windows, as the CLI reads it through os.UserHomeDir.
- Endpoint gains Npipe; parseHost reads npipe://, an empty path being the default pipe
- layerFromEnv takes the platform's default Endpoint; NodeDocker.layerFromEnv uses the named pipe on Windows
- NodeDocker reaches a named pipe through socketPath
- Handle.frames is the output in arrival order; all, stdout and stderr are views of it, read once
- DockerExec.run collects stdout and stderr from frames
- attach resolves its framing after owning the upgraded connection, so a failed inspect closes it
- plugin install removes the plugin only after its own pull succeeded
- push and tag reject a reference with a digest instead of dropping it
- every error response body is read up to 1 MiB, declared statuses included
- unit suites cut from 117 to 55 tests, merged per behavior
- Swarm and plugin services covered by fake-engine round trips over DockerApi
- live suites cut to 11 tests; the docker:dind suites and their helper are removed
- the pinned API 1.44 CI rerun becomes one live decode test in DockerSystem
- CI no longer pulls docker:29-dind or busybox
- drop the platform-node DockerApi test, which duplicated the fake-engine round trip
- DockerApi.Filters decodes through Schema.fromJsonString, so a server
given malformed filters fails with a SchemaError, not a defect.
- DockerConfig formats a host as the CLI writes it (formatHost), for
its proxy lookup and DockerEngine's ConnectionFailed target alike,
instead of two copies.
- DockerPlugins.install takes its options inline: InstallOptions was a
named type for one API.
- NodeDocker's tests return scoped effects to it.effect instead of
wrapping them in Effect.scoped.
- The changeset is one sentence; the detail belongs in the PR.
- DOCKER.md and UnsupportedScheme say that ssh:// is planned on top of
Effect's SSH client, DOCKER.md shows a stub HttpClient for checking
what code sends, and DockerEngine.client's doc names a failed
negotiation among its failures.
Registry credentials move out of DockerEngine into their own service,
DockerRegistryAuth, with one method: the credential for a registry, or
undefined for anonymous. Its layer resolves them as the Docker CLI
does, from the DockerConfig, running credential helpers through the
ChildProcessSpawner, as the engine did before.
DockerEngine is now only the connection: DockerEngine.make needs just
the DockerConfig, and no longer a ChildProcessSpawner. DockerImages,
DockerPlugins and DockerServices require DockerRegistryAuth, and so
does Docker.layer. NodeDocker's layers provide it, with helpers run as
Node.js child processes; to resolve credentials another way, such as
minting short-lived tokens, provide the service yourself.
DockerApi's error responses and DockerError's response reasons were two
classes per status, translated one to one. They are now one set: each
of BadRequest, Unauthorized, Forbidden, NotFound, Conflict,
PreconditionFailed, TooManyRequests, ServerError, NotImplemented,
Unavailable and SwarmUnavailable is a Schema.TaggedError with the
Engine's { message } body and a status getter, declared by DockerApi
and used as the reason as it is decoded.
The operation that failed moves from the reasons to DockerError's
operation, so a reason is only what the Engine said. A DockerError that
already names an operation keeps it.
Swarm endpoints declare their error responses with a SwarmErrors
middleware whose 503 is SwarmUnavailable, which replaces the
SwarmEndpoint annotation and the client's remap of Unavailable.
DockerImages covers list, inspect, history, attestations, tag, remove,
prune, search, commit, distribution, save, load, pull, push and import,
each an endpoint of DockerApi's Images group: platforms and the padded
base64url X-Registry-Auth header are schemas, and the service turns an
ImageReference into the Engine's fromImage and tag. The engine resolves
credentials as the Docker CLI does, with one registry normalization,
an exact helper "not found" match and a helper timeout; every registry
operation sends X-Registry-Auth. Registry headers and secret query
parameters are redacted in spans.
Every operation is an endpoint of DockerApi's groups, whose schemas carry
the wire mapping (renamed query keys, durations, times, header-borne results,
version gates as annotations); service methods only reshape arguments.
Logs demultiplex the Engine's stream framing, attach and exec start run
over core's HTTP upgrade, and archives stream as tar request and
response bodies.
DockerConfig resolves the client's configuration as plain data, statically or
as the Docker CLI does; a malformed config.json auth entry now fails, as it
does in the CLI. DockerEngine wraps one HttpClient: lazy, cached API version
negotiation, the configured headers, and connection failures as DockerError.
Exec and attach will use HttpClient upgrades, so there is no separate dialer.
ConnectionFailed carries the Engine's address instead of the Endpoint, so TLS
keys never reach errors or logs, and its hints come from Node error codes.
DockerSystem is the one public ping. NodeDocker builds the engine over a
node:http client, which sets no timeouts and supports upgrades over unix
sockets and TLS.
DockerApi defines the Engine API as HttpApi endpoint groups, one per
area, with DockerApi as the HttpApi of them all; the services are clients
of their group, and each later commit adds its groups. The groups
describe what the client sends, with unversioned paths, and every group
declares the Engine's error responses with the EngineErrors middleware:
moby's status table, from which the services' DockerError reasons come,
naming the operation. Requests outside DockerApi check their status with
the same table.