Repository navigation
1.3.0
What's Changed
⚠️ Breaking changes
- Mutual TLS by default. The Docker API is served only over mutual TLS, on port
2376, and d2k won't start without certificates.- On first start with no
d2k-tlsSecret, d2k creates a CA, a server certificate and a client certificate. The client certificate goes in thed2k-clientSecret. - Plain TCP on
2375is gone unless you setD2K_INSECURE=true. - To use your own CA, run
d2k pki init, or have cert-manager issue thed2k-tlsSecret.
- On first start with no
- Docker host mode is now the default (
D2K_SWARM_MODE=false). If an install relied on Swarm mode, which was the 1.2.x default, setD2K_SWARM_MODE="true". - The admission policy is cluster-wide.
deploy/admission-policy.yamlis a ValidatingAdmissionPolicy shared by every install on the cluster. Apply it once per cluster. - Pod security labels were removed from the namespace in the manifest. Pod security now comes from the cluster default or Portainer's Pod Security Standards policy.
- Upgrading from 1.2.x happens in place. On first start, d2k migrates the Docker names, labels and start times that 1.2.x created. It can't recover what 1.2.x never kept: volume data written outside volumes, underscores in names, and compose's config hash. See README → Upgrading from d2k 1.2.x.
- The first
docker compose upof each project after upgrading re-creates every container in it, even if the compose file hasn't changed.
- The first
Feature
- Docker Engine API 1.52.
- The Docker CLI, Docker Compose and Portainer can now use d2k as they would a Docker daemon. It's the d2k side of D2K environments in Portainer BE.
- The 1.52 spec is embedded and the routes are generated from it. Contract tests check every JSON response against the spec.
- Containers.
- The full create request is translated. Any setting with no Kubernetes equivalent is named in a warning instead of being dropped silently.
- Container states come from the pods, and healthchecks become readiness probes.
- Restart policies
noandon-failurerun once, as a pod.alwaysandunless-stoppedrun as a Deployment replica. stop,restartandrm -freturn once the container has stopped, as Docker does.-tsets the grace period.exec,attach,waitand TTY resize work from the Docker CLI and the Portainer console.logsfollows Docker's semantics,statscomes from the metrics API, andeventsare recorded as the Docker daemon records them.docker cpinto a container works before it starts, up to 1 MiB in total.
- Compose and Swarm.
- Compose attributes are no longer dropped silently.
- Compose secrets and configs work, from the environment and from inline content.
- A container's networks are recorded on it, so they survive d2k restarts.
- A Swarm service's container carries Docker's task labels, so Portainer can give the container the service's ownership.
- Volumes and images.
- Volumes have Docker's shape, names and labels.
docker imageslists the images that the namespace's containers use.pullis acknowledged, since Kubernetes pulls the image when a container starts. Build, push, tag and prune answer501.
- Server.
- Listens on mutual TLS (
2376), a plain health port, and an optional unix socket. - Certificates reload when their Secret changes.
- A
preStopdelay keeps connections from being dropped while d2k's pod restarts.
- Listens on mutual TLS (
- Hardened pod. d2k runs as a non-root user (
65532), with a read-only root filesystem, no capabilities, and theRuntimeDefaultseccomp profile. - Logging and API calls. Logging uses zerolog, client-side API calls are rate-limited, and
docker psmakes a constant number of API calls whatever the namespace holds.
Fixes
- d2k only acts on the objects it manages.
docker rm d2kcould previously delete d2k itself.docker rm apicould deletemy-api.
- List filters are honoured.
docker compose down, removing a stack in Portainer, anddocker stack rmpreviously acted on every object in the namespace. - Docker-style errors.
- Unsupported operations now answer
501with a Docker error, not a plain-text404. - Errors use Docker's status codes:
400,404,409and501. - Starting a running container, or stopping a stopped one, answers
304.
- Unsupported operations now answer
- Container IDs are 64 hex characters and resolve as Docker resolves them: by exact name, or by ID prefix.
/info,/versionand/_pingreport the real host.NCPUis1, not0, under a CPU quota below one CPU.--entrypoint ""clears the image's entrypoint, as in Docker.- Container names follow Docker's rules, so
/webis accepted. - Security: replaced the frozen
docker/dockermodule withgithub.com/moby/moby/api, removing two govulncheck advisories that have no fix.
Chore
- Release workflow:
:latestis no longer published with every release.release.ymlcreates a pre-release and publishes only the versioned image tag.- The new
promote-release.ymlmoves:latestonly when a release is promoted to GitHub's latest. It retags the image already published, without rebuilding it. - A
v-prefixed version input no longer leaks into the Docker tag.
- CI:
- Workflow files were renamed from
.yamlto.yml, and their job and step names aligned. - The Docker Hub secret names were standardised to
DOCKER_HUB_USERNAME/DOCKER_HUB_PASSWORD. - CI gates were added, workflows hardened, and the repository is lint-clean.
- Workflow files were renamed from
- Tests: added kind end-to-end suites in
test/e2e.
Full Changelog: 1.2.3...1.3.0