# What changed in docker

> 43 changes in docker 6 to 7 from its official release notes, upgrade guides and advisories: 11 breaking, 1 deprecations, 1 security, 21 new APIs and options. Each one cited. Sources checked 2026-10-23. HTML: https://unstale.sh/pypi/docker/

To see which of these apply to a repository, run `npx @unstale/cli init` in it.

## docker 7

### Breaking changes

- 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. (7.2.0) — [release notes](https://github.com/docker/docker-py/releases/tag/7.2.0)
- The explicit hostname check option was removed. (7.0.0) — [release notes](https://github.com/docker/docker-py/releases/tag/7.0.0)
- Full networking_config support is available for containers.create(), replacing network_driver_opt. (7.0.0) — [release notes](https://github.com/docker/docker-py/releases/tag/7.0.0)
- Websocket support is no longer included by default; install this extra to include the websocket-client dependency. (7.0.0) — [release notes](https://github.com/docker/docker-py/releases/tag/7.0.0)
- Python 3.7 is no longer supported. (7.0.0) — [release notes](https://github.com/docker/docker-py/releases/tag/7.0.0)
- The SSL version option was removed. (7.0.0) — [release notes](https://github.com/docker/docker-py/releases/tag/7.0.0)
- Tag format is validated before push. (7.0.0) — [release notes](https://github.com/docker/docker-py/releases/tag/7.0.0)

### New APIs and options

- A new function explicitly creates a client from a Docker CLI context. (7.2.0) — [release notes](https://github.com/docker/docker-py/releases/tag/7.2.0)
- A new class method explicitly creates a client from a Docker CLI context. (7.2.0) — [release notes](https://github.com/docker/docker-py/releases/tag/7.2.0)
- Volumes now support subpaths. (7.2.0) — [release notes](https://github.com/docker/docker-py/releases/tag/7.2.0)
- Bind mount propagation modes such as rshared and private are supported. (7.0.0) — [release notes](https://github.com/docker/docker-py/releases/tag/7.0.0)
- container.commit() accepts a pause option. (7.0.0) — [release notes](https://github.com/docker/docker-py/releases/tag/7.0.0)
- A container health property returns its status, such as unhealthy. (7.0.0) — [release notes](https://github.com/docker/docker-py/releases/tag/7.0.0)
- prune_builds() accepts all on API v1.39 and later. (7.0.0) — [release notes](https://github.com/docker/docker-py/releases/tag/7.0.0)
- prune_builds() accepts filters on API v1.39 and later. (7.0.0) — [release notes](https://github.com/docker/docker-py/releases/tag/7.0.0)
- prune_builds() accepts keep_storage on API v1.39 and later. (7.0.0) — [release notes](https://github.com/docker/docker-py/releases/tag/7.0.0)

### Behavior and default changes

- The default API version is now 1.45, corresponding to Moby 26.0/26.1. (7.2.0) — [release notes](https://github.com/docker/docker-py/releases/tag/7.2.0)

### Fixes and other changes

- 404 responses now consistently return docker.errors.NotFound. (7.0.0) — [release notes](https://github.com/docker/docker-py/releases/tag/7.0.0)
- Python 3.12 is supported. (7.0.0) — [release notes](https://github.com/docker/docker-py/releases/tag/7.0.0)

## docker 6

### Breaking changes

- docker.credentials.utils.find_executable was removed. (6.0.0) — [release notes](https://github.com/docker/docker-py/releases/tag/6.0.0)
- The default native Python SSH client rejects unknown host keys with paramiko.ssh_exception.SSHException. (6.0.0) — [release notes](https://github.com/docker/docker-py/releases/tag/6.0.0)
- Python 3.7 or later is now the minimum supported version. (6.0.0) — [release notes](https://github.com/docker/docker-py/releases/tag/6.0.0)
- Short IDs are now 12 characters instead of 10, matching the Docker CLI. (6.0.0) — [release notes](https://github.com/docker/docker-py/releases/tag/6.0.0)

### Security

- TLS automatically negotiates the most secure available version. (6.0.0) — [release notes](https://github.com/docker/docker-py/releases/tag/6.0.0)

### Deprecations

- The pip extra is deprecated and is a no-op; install docker instead because TLS support is always available. (6.0.0) — [release notes](https://github.com/docker/docker-py/releases/tag/6.0.0)

### New APIs and options

- Container creation supports the cgroupns option. (6.0.0) — [release notes](https://github.com/docker/docker-py/releases/tag/6.0.0)
- Container runs support the cgroupns option. (6.0.0) — [release notes](https://github.com/docker/docker-py/releases/tag/6.0.0)
- Swarm support was added for DataPathPort. (6.0.0) — [release notes](https://github.com/docker/docker-py/releases/tag/6.0.0)
- Swarm support was added for GlobalJob and ReplicatedJobs. (6.0.0) — [release notes](https://github.com/docker/docker-py/releases/tag/6.0.0)
- Image gains a remove() method. (6.0.0) — [release notes](https://github.com/docker/docker-py/releases/tag/6.0.0)
- Containers can connect with a specified MAC address. (6.0.0) — [release notes](https://github.com/docker/docker-py/releases/tag/6.0.0)
- Container create and run accept a platform such as linux/amd64 or darwin/arm64. (6.0.0) — [release notes](https://github.com/docker/docker-py/releases/tag/6.0.0)
- Plugin.disable() accepts a force parameter. (6.0.0) — [release notes](https://github.com/docker/docker-py/releases/tag/6.0.0)
- Swarm support was added for GlobalJob and ReplicatedJobs. (6.0.0) — [release notes](https://github.com/docker/docker-py/releases/tag/6.0.0)
- Services accept a RollbackConfig argument. (6.0.0) — [release notes](https://github.com/docker/docker-py/releases/tag/6.0.0)
- Docker Swarm services support sysctl settings. (6.0.0) — [release notes](https://github.com/docker/docker-py/releases/tag/6.0.0)
- Version metadata is now exposed as __version__. (6.0.0) — [release notes](https://github.com/docker/docker-py/releases/tag/6.0.0)

### Fixes and other changes

- Trailing whitespace in .dockerignore files is ignored. (6.0.0) — [release notes](https://github.com/docker/docker-py/releases/tag/6.0.0)
- Exceptions preserve context when re-raised. (6.0.0) — [release notes](https://github.com/docker/docker-py/releases/tag/6.0.0)
- Launching the external SSH client no longer spawns an extra subshell. (6.0.0) — [release notes](https://github.com/docker/docker-py/releases/tag/6.0.0)
- IPv6 hosts are parsed correctly when an explicit port is specified. (6.0.0) — [release notes](https://github.com/docker/docker-py/releases/tag/6.0.0)
- The ProxyCommand option for SSH connections is fixed. (6.0.0) — [release notes](https://github.com/docker/docker-py/releases/tag/6.0.0)
- Python 3.10 is supported. (6.0.0) — [release notes](https://github.com/docker/docker-py/releases/tag/6.0.0)
