pypi / docker
docker
What changed in docker 6 to 7, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-23.
11 breaking1 security1 deprecations21 new APIs and options1 behavior and defaults8 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli initdocker 719 changes
Breaking changes 7
When DOCKER_HOST is not set, the default client now honors DOCKER_CONTEXT or the current Docker CLI context. Set DOCKER_HOST explicitly, use DOCKER_CONTEXT=default, or pass use_context=False to retain the previous connection behavior.
The explicit hostname check option was removed.
Full networking_config support is available for containers.create(), replacing network_driver_opt.
Websocket support is no longer included by default; install this extra to include the websocket-client dependency.
Python 3.7 is no longer supported.
The SSL version option was removed.
Tag format is validated before push.
New APIs and options 9
A new function explicitly creates a client from a Docker CLI context.
A new class method explicitly creates a client from a Docker CLI context.
Volumes now support subpaths.
Bind mount propagation modes such as rshared and private are supported.
container.commit() accepts a pause option.
A container health property returns its status, such as unhealthy.
prune_builds() accepts all on API v1.39 and later.
prune_builds() accepts filters on API v1.39 and later.
prune_builds() accepts keep_storage on API v1.39 and later.
Behavior and default changes 1
The default API version is now 1.45, corresponding to Moby 26.0/26.1.
Fixes and other changes 2
404 responses now consistently return docker.errors.NotFound.
Python 3.12 is supported.
docker 624 changes
Breaking changes 4
docker.credentials.utils.find_executable was removed.
The default native Python SSH client rejects unknown host keys with paramiko.ssh_exception.SSHException.
Python 3.7 or later is now the minimum supported version.
Short IDs are now 12 characters instead of 10, matching the Docker CLI.
Security 1
TLS automatically negotiates the most secure available version.
Deprecations 1
The pip extra is deprecated and is a no-op; install docker instead because TLS support is always available.
New APIs and options 12
Container creation supports the cgroupns option.
Container runs support the cgroupns option.
Swarm support was added for DataPathPort.
Swarm support was added for GlobalJob and ReplicatedJobs.
Image gains a remove() method.
Containers can connect with a specified MAC address.
Container create and run accept a platform such as linux/amd64 or darwin/arm64.
Plugin.disable() accepts a force parameter.
Swarm support was added for GlobalJob and ReplicatedJobs.
Services accept a RollbackConfig argument.
Docker Swarm services support sysctl settings.
Version metadata is now exposed as __version__.
Fixes and other changes 6
Trailing whitespace in .dockerignore files is ignored.
Exceptions preserve context when re-raised.
Launching the external SSH client no longer spawns an extra subshell.
IPv6 hosts are parsed correctly when an explicit port is specified.
The ProxyCommand option for SSH connections is fixed.
Python 3.10 is supported.