3.0.0
List of PRs / issues for this release
Breaking changes
- Support for API version < 1.21 has been removed.
- The following methods have been removed:
APIClient.copy
has been removed. Users should useAPIClient.get_archive
instead.APIClient.insert
has been removed. Users may useAPIClient.put_archive
combined withAPIClient.commit
to replicate the method's behavior.utils.ping_registry
andutils.ping
have been removed.
- The following parameters have been removed:
stream
inAPIClient.build
cpu_shares
,cpuset
,dns
,mem_limit
,memswap_limit
,
volume_driver
,volumes_from
inAPIClient.create_container
. These are
all replaced by their equivalent increate_host_config
insecure_registry
inAPIClient.login
,APIClient.pull
,
APIClient.push
,DockerClient.images.push
andDockerClient.images.pull
viz
inAPIClient.images
- The following parameters have been renamed:
endpoint_config
inAPIClient.create_service
and
APIClient.update_service
is nowendpoint_spec
name
inDockerClient.images.pull
is nowrepository
- The return value for the following methods has changed:
APIClient.wait
andContainer.wait
now return adict
representing
the API's response instead of returning the status code directly.DockerClient.images.load
now returns a list ofImage
objects that have
for the images that were loaded, instead of a log stream.Container.exec_run
now returns a tuple of (exit_code, output) instead of
just the output.DockerClient.images.build
now returns a tuple of (image, build_logs)
instead of just the image object.APIClient.export
,APIClient.get_archive
andAPIClient.get_image
now
return generators streaming the raw binary data from the server's response.- When no tag is provided,
DockerClient.images.pull
now returns a list of
Image
s associated to the pulled repository instead of just thelatest
image.
Features
- The Docker Python SDK is now officially supported on Python 3.6
- Added
scale
method to theService
model ; this method is a shorthand
that callsupdate_service
with the required number of replicas - Added support for the
platform
parameter inAPIClient.build
,
DockerClient.images.build
,APIClient.pull
andDockerClient.images.pull
- Added support for the
until
parameter inAPIClient.logs
and
Container.logs
- Added support for the
workdir
argument inAPIClient.exec_create
and
Container.exec_run
- Added support for the
condition
argument inAPIClient.wait
and
Container.wait
- Users can now specify a publish mode for ports in
EndpointSpec
using
the{published_port: (target_port, protocol, publish_mode)}
syntax. - Added support for the
isolation
parameter inContainerSpec
,
DockerClient.services.create
andService.update
APIClient.attach_socket
,APIClient.exec_create
now allow specifying a
detach_keys
combination. If unspecified, the value from theconfig.json
file will be used- TLS connections now default to using the TLSv1.2 protocol when available
Bugfixes
- Fixed a bug where whitespace-only lines in
.dockerignore
would break builds
on Windows - Fixed a bug where broken symlinks inside a build context would cause the
build to fail - Fixed a bug where specifying volumes with Windows drives would cause
incorrect parsing inDockerClient.containers.run
- Fixed a bug where the
networks
data provided tocreate_service
and
update_service
would be sent incorrectly to the Engine with API < 1.25 - Pulling all tags from a repository with no
latest
tag using the
DockerClient
will no longer raise aNotFound
exception