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.copyhas been removed. Users should useAPIClient.get_archive
instead.APIClient.inserthas been removed. Users may useAPIClient.put_archive
combined withAPIClient.committo replicate the method's behavior.utils.ping_registryandutils.pinghave been removed.
- The following parameters have been removed:
streaminAPIClient.buildcpu_shares,cpuset,dns,mem_limit,memswap_limit,
volume_driver,volumes_frominAPIClient.create_container. These are
all replaced by their equivalent increate_host_configinsecure_registryinAPIClient.login,APIClient.pull,
APIClient.push,DockerClient.images.pushandDockerClient.images.pullvizinAPIClient.images
- The following parameters have been renamed:
endpoint_configinAPIClient.create_serviceand
APIClient.update_serviceis nowendpoint_specnameinDockerClient.images.pullis nowrepository
- The return value for the following methods has changed:
APIClient.waitandContainer.waitnow return adictrepresenting
the API's response instead of returning the status code directly.DockerClient.images.loadnow returns a list ofImageobjects that have
for the images that were loaded, instead of a log stream.Container.exec_runnow returns a tuple of (exit_code, output) instead of
just the output.DockerClient.images.buildnow returns a tuple of (image, build_logs)
instead of just the image object.APIClient.export,APIClient.get_archiveandAPIClient.get_imagenow
return generators streaming the raw binary data from the server's response.- When no tag is provided,
DockerClient.images.pullnow returns a list of
Images associated to the pulled repository instead of just thelatest
image.
Features
- The Docker Python SDK is now officially supported on Python 3.6
- Added
scalemethod to theServicemodel ; this method is a shorthand
that callsupdate_servicewith the required number of replicas - Added support for the
platformparameter inAPIClient.build,
DockerClient.images.build,APIClient.pullandDockerClient.images.pull - Added support for the
untilparameter inAPIClient.logsand
Container.logs - Added support for the
workdirargument inAPIClient.exec_createand
Container.exec_run - Added support for the
conditionargument inAPIClient.waitand
Container.wait - Users can now specify a publish mode for ports in
EndpointSpecusing
the{published_port: (target_port, protocol, publish_mode)}syntax. - Added support for the
isolationparameter inContainerSpec,
DockerClient.services.createandService.update APIClient.attach_socket,APIClient.exec_createnow allow specifying a
detach_keyscombination. 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
.dockerignorewould 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
networksdata provided tocreate_serviceand
update_servicewould be sent incorrectly to the Engine with API < 1.25 - Pulling all tags from a repository with no
latesttag using the
DockerClientwill no longer raise aNotFoundexception