Docker

Latest version: v7.1.0

Safety actively analyzes 693883 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 5 of 19

4.0.1

-----

[List of PRs / issues for this release](https://github.com/docker/docker-py/milestone/60?closed=1)

Bugfixes

- Fixed an obsolete import in the `credentials` subpackage that caused import errors in
Python 3.7

Miscellaneous

- Docs building has been repaired

4.0.0

-----

[List of PRs / issues for this release](https://github.com/docker/docker-py/milestone/57?closed=1)

Breaking changes

- Support for Python 3.3 and Python 3.4 has been dropped
- `APIClient.update_service`, `APIClient.init_swarm`, and
`DockerClient.swarm.init` now return a `dict` from the API's response body
- In `APIClient.build` and `DockerClient.images.build`, the `use_config_proxy`
parameter now defaults to True
- `init_path` is no longer a valid parameter for `HostConfig`

Features

- It is now possible to provide `SCTP` ports for port mappings
- `ContainerSpec`s now support the `init` parameter
- `DockerClient.swarm.init` and `APIClient.init_swarm` now support the
`data_path_addr` parameter
- `APIClient.update_swarm` and `DockerClient.swarm.update` now support the
`rotate_manager_unlock_key` parameter
- `APIClient.update_service` returns the API's response body as a `dict`
- `APIClient.init_swarm`, and `DockerClient.swarm.init` now return the API's
response body as a `dict`

Bugfixes

- Fixed `PlacementPreference` instances to produce a valid API type
- Fixed a bug where not setting a value for `buildargs` in `build` could cause
the library to attempt accessing attributes of a `None` value
- Fixed a bug where setting the `volume_driver` parameter in
`DockerClient.containers.create` would result in an error
- `APIClient.inspect_distribution` now correctly sets the authentication
headers on the request, allowing it to be used with private repositories
This change also applies to `DockerClient.get_registry_data`

3.7.2

-----

[List of PRs / issues for this release](https://github.com/docker/docker-py/milestone/59?closed=1)

Bugfixes

* Fix base_url to keep TCP protocol on utils.py by letting the responsibility of changing the
protocol to `parse_host` afterwards, letting `base_url` with the original value.
* XFAIL test_attach_stream_and_cancel on TLS

3.7.1

-----

[List of PRs / issues for this release](https://github.com/docker/docker-py/milestone/58?closed=1)

Bugfixes

* Set a different default number (which is now 9) for SSH pools
* Adds a BaseHTTPAdapter with a close method to ensure that the
pools is clean on close()
* Makes SSHHTTPAdapter reopen a closed connection when needed
like the others

3.7.0

-----

[List of PRs / issues for this release](https://github.com/docker/docker-py/milestone/56?closed=1)

Features

* Added support for multiplexed streams (for `attach` and `exec_start`). Learn
more at https://docker-py.readthedocs.io/en/stable/user_guides/multiplex.html
* Added the `use_config_proxy` parameter to the following methods:
`APIClient.build`, `APIClient.create_container`, `DockerClient.images.build`
and `DockerClient.containers.run` (`False` by default). **This parameter**
**will become `True` by default in the 4.0.0 release.**
* Placement preferences for Swarm services are better validated on the client
and documentation has been updated accordingly

Bugfixes

* Fixed a bug where credential stores weren't queried for relevant registry
credentials with certain variations of the `config.json` file.
* `DockerClient.swarm.init` now returns a boolean value as advertised.

3.6.0

-----

[List of PRs / issues for this release](https://github.com/docker/docker-py/milestone=55?closed=1)

Features

* Added support for connecting to the Docker Engine over SSH. Additional
dependencies for this feature can be installed with
`pip install "docker[ssh]"`
* Added support for the `named` parameter in `Image.save`, which may be
used to ensure the resulting tarball retains the image's name on save.

Bugfixes

* Fixed a bug where builds on Windows with a context path using the `\\?\`
prefix would fail with some relative Dockerfile paths.
* Fixed an issue where pulls made with the `DockerClient` would fail when
setting the `stream` parameter to `True`.

Miscellaneous

* The minimum requirement for the `requests` dependency has been bumped
to 2.20.0

Page 5 of 19

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.