mirror of https://github.com/docker/docker-py.git
26 KiB
26 KiB
Change Log
1.6.0
List of PRs / issues for this release
Features
- Added support for the
sinceparam inClient.logs(introduced in API version 1.19) - Added support for the
DOCKER_CONFIGenvironment variable when looking up auth config - Added support for the
streamparam inClient.stats(when set toFalse, allows user to retrieve a single snapshot instead of a constant data stream) - Added support for the
mem_swappiness,oom_kill_disableparams inClient.create_host_config - Added support for build arguments in
Client.buildthrough thebuildargsparam.
Bugfixes
- Fixed a bug where streaming data over HTTPS would sometimes behave incorrectly with Python 3.x
- Fixed a bug where commands containing unicode characters would be incorrectly
handled by
Client.create_container. - Fixed a bug where auth config credentials containing unicode characters would cause failures when pushing / pulling images.
- Setting
tail=0inClient.logsno longer shows past logs.
Miscellaneous
- Default API version is now 1.21 (introduced in Docker 1.9.0)
- Several test improvements and cleanup that should make the suite easier to expand and maintain moving forward.
1.5.0
List of PRs / issues for this release
Features
- Added support for the networking API introduced in Docker 1.9.0
(
Client.networks,Client.create_network,Client.remove_network,Client.inspect_network,Client.connect_container_to_network,Client.disconnect_container_from_network). - Added support for the volumes API introduced in Docker 1.9.0
(
Client.volumes,Client.create_volume,Client.inspect_volume,Client.remove_volume). - Added support for the
group_addparameter increate_host_config. - Added support for the CPU CFS (
cpu_quotaandcpu_period) parameteres increate_host_config. - Added support for the archive API endpoint (
Client.get_archive,Client.put_archive). - Added support for
ps_argsparameter inClient.top.
Bugfixes
- Fixed a bug where specifying volume binds with unicode characters would fail.
- Fixed a bug where providing an explicit protocol in
Client.portwould fail to yield the expected result. - Fixed a bug where the priority protocol returned by
Client.portwould be UDP instead of the expected TCP.
Miscellaneous
- Broke up Client code into several files to facilitate maintenance and contribution.
- Added contributing guidelines to the repository.
1.4.0
List of PRs / issues for this release
Deprecation warning
docker.utils.create_host_configis deprecated in favor ofClient.create_host_config.
Features
- Added
utils.parse_env_fileto support env-files. See docs for usage. - Added support for arbitrary log drivers
- Added support for URL paths in the docker host URL (
base_url) - Drastically improved support for .dockerignore syntax
Bugfixes
- Fixed a bug where exec_inspect would allow invocation when the API version was too low.
- Fixed a bug where
docker.utils.ports.split_portwould break if an open range was provided. - Fixed a bug where invalid image IDs / container IDs could be provided to bypass or reroute request URLs
- Default
base_urlnow adapts depending on the OS (better Windows support) - Fixed a bug where using an integer as the user param in
Client.create_containerwould result in a failure.
Miscellaneous
- Docs fixes
- Integration tests are now run as part of our continuous integration.
- Updated dependency on
sixlibrary
1.3.1
List of PRs / issues for this release
Bugfixes
- Fixed a bug where empty chunks in streams was misinterpreted as EOF.
datetimearguments passed toClient.eventsparameterssinceanduntilare now always considered to be UTC.- Fixed a bug with Docker 1.7.x where the wrong auth headers were being passed
in
Client.build, failing builds that depended on private images. Client.exec_createcan now retrieve theIdkey from a dictionary for its container param.
Miscellaneous
- 404 API status now raises
docker.errors.NotFound. This exception inheritsAPIErrorwhich was used previously. - Docs fixes
- Test fixes
1.3.0
List of PRs / issues for this release
Deprecation warning
- As announced in the 1.2.0 release,
Client.executehas been removed in favor ofClient.exec_createandClient.exec_start.
Features
extra_hostsparameter in host config can now also be provided as a list.- Added support for
memory_limitandmemswap_limitin host config to comply with recent deprecations. - Added support for
volume_driverinClient.create_container - Added support for advanced modes in volume binds (using the
modekey) - Added support for
decodeinClient.build(decodes JSON stream on the fly) - docker-py will now look for login configuration under the new config path,
and fall back to the old
~/.dockercfgpath if not present.
Bugfixes
- Configuration file lookup now also work on platforms that don't define a
$HOMEenvironment variable. - Fixed an issue where pinging a v2 private registry wasn't working properly, preventing users from pushing and pulling.
pullparameter inClient.buildnow defaults toFalse. Fixes a bug where the default options would try to force a pull of non-remote images.- Fixed a bug where getting logs from tty-enabled containers wasn't working properly with more recent versions of Docker
Client.pushandClient.pullwill now raise exceptions if the HTTP status indicates an error.- Fixed a bug with adapter lookup when using the Unix socket adapter (this affected some weird edge cases, see issue #647 for details)
- Fixed a bug where providing
timeout=NonetoClient.stopwould result in an exception despite the usecase being valid. - Added
git@to the list of valid prefixes for remote build paths.
Dependencies
- The websocket-client dependency has been updated to a more recent version.
This new version also supports Python 3.x, making
attach_socketavailable on those versions as well.
Documentation
- Various fixes
1.2.3
List of PRs / issues for this release
Deprecation warning
- Passing host config in the
Client.startmethod is now deprecated. Please use thehost_configinClient.create_containerinstead.
Features
- Added support for
privilegedparam inClient.exec_create(only available in API >= 1.19) - Volume binds can now also be specified as a list of strings.
Bugfixes
- Fixed a bug where the
read_onlyparam in host_config wasn't handled properly. - Fixed a bug in
Client.execute(this method is still deprecated). - The
cpusetparam inClient.create_containeris also passed as theCpusetCpusparam (Cpusetdeprecated in recent versions of the API) - Fixed an issue with integration tests being run inside a container
(
make integration-test) - Fixed a bug where an empty string would be considered a valid container ID or image ID.
- Fixed a bug in
Client.insert
Documentation
- Various fixes
1.2.2
Bugfixes
- Fixed a bug where parameters passed to
Client.exec_resizewould be ignored (#576) - Fixed a bug where auth config wouldn't be resolved properly in
Client.pull(#577)
1.2.1
Bugfixes
- Fixed a bug where the check_resource decorator would break with some argument-passing methods. (#573)
1.2.0
List of PRs / issues for this release
Deprecation warning
Client.executeis being deprecated in favor of the more dev-friendlyClient.exec_startandClient.exec_create. It will be removed in 1.3.0
Features
- Added
exec_create,exec_start,exec_inspectandexec_resizeto client, accurately mirroring the Exec API - Added
auth_configparam toClient.pull(allows to use one-off credentials for this pull request) - Added support for
ipc_modein host config. - Added support for the
log_configparam in host config. - Added support for the
ulimitparam in host config. - Added support for container resource limits in
Client.build. - When a resource identifier (image or container ID) is passed to a Client
method, we now check for
Nonevalues to avoid crashing (now raisesdocker.errors.NullResource) - Added tools to parse port ranges inside the new
docker.utils.portspackage. - Added a
version_infoattribute to thedockerpackage.
Bugfixes
- Fixed a bug in
Client.portwhere absence of a certain key in the container's JSON would raise an error (now just returnsNone) - Fixed a bug with the
truncparameter inClient.containershaving no effect (moved functionality to the client) - Several improvements have been made to the
Client.import_imagemethod. - Fixed pushing / pulling to v2 registries
- Fixed a bug where passing a container dictionary to
Client.commitwould fail
Miscellaneous
- Default API version has been bumped to 1.18 (Docker Engine 1.6.0)
- Several testing coverage improvements
- Docs fixes and improvements
1.1.0
Features
- Added
dockerfileparam support toClient.build(mirrorsdocker build -fbehavior) - Added the ability to specify
'auto'asversioninClient.__init__, allowing the constructor to autodetect the daemon's API version.
Bugfixes
- Fixed a bug where decoding a result stream using the
decodeparameter would break when using Python 3.x - Fixed a bug where some files in
.dockerignoreweren't being handled properly - Fixed
resolve_authconfigissues by bringing it closer to Docker Engine's behavior. This should fix all issues encountered with private registry auth - Fixed an issue where passwords containing a colon weren't being handled properly.
- Bumped
requestsversion requirement, which should fix most of the SSL issues encountered recently.
Miscellaneous
- Several integration test improvements.
- Fixed some unclosed resources in unit tests.
- Several docs improvements.
1.0.0
Features
- Added new
Client.renamemethod (docker rename) - Added now
Client.statsmethod (docker stats) - Added
read_onlyparam support toutils.create_host_configandClient.start(docker run --read-only) - Added
pid_modeparam support toutils.create_host_configandClient.start(docker run --pid='host') - Added
since,untilandfiltersparams toClient.events. - Added
decodeparameter toClient.statsandClient.eventsto decode JSON objects on the fly (False by default).
Bugfixes
- Fixed a bug that caused
Client.buildto crash when the provided source was a remote source.
Miscellaneous
- Default API version has been bumped to 1.17 (Docker Engine 1.5.0)
Client.timeoutis now a public attribute, and users are encouraged to use it when request timeouts need to be changed at runtime.- Added
Client.api_versionas a read-only property. - The
memswap_limitargument inClient.create_containernow accepts string type values similar tomem_limit('6g', '120000k', etc.) - Improved documentation
0.7.2
Features
- Added support for
mac_addressinClient.create_container
Bugfixes
- Fixed a bug where streaming responses (
pull,push,logs, etc.) were unreliable (#300) - Fixed a bug where resolve_authconfig wouldn't properly resolve configuration for private repositories (#468)
- Fixed a bug where some errors wouldn't be properly constructed in
client.py, leading to unhelpful exceptions bubbling up (#466) - Fixed a bug where
Client.buildwould try to close context when externally provided (custom_context == True) (#458) - Fixed an issue in
create_host_configwhere empty sequences wouldn't be interpreted properly (#462)
Miscellaneous
- Added
resolve_authconfigtests.
0.7.1
Bugfixes
setup.pynow indicates a maximum version of requests to work around the boot2docker /assert_hostnamebug.- Removed invalid exception when using the Registry Hub's FQDN when pulling.
- Fixed an issue where early HTTP errors weren't handled properly in streaming responses.
- Fixed a bug where sockets would close unexpectedly using Python 3.x
- Various fixes for integration tests.
Miscellaneous
- Small doc fixes
0.7.0
Breaking changes
- Passing
dnsorvolumes_frominClient.startwith API version < 1.10 will now raise an exception (previously only triggered a warning)
Features
- Added support for
host_configinClient.create_container - Added utility method
docker.utils.create_host_configto help build a properHostConfigdictionary. - Added support for the
pullparameter inClient.build - Added support for the
forcermparameter inClient.build - Added support for
extra_hostsinClient.start - Added support for a custom
timeoutinClient.wait - Added support for custom
.dockercfgloading inClient.login(dockercfg_pathargument)
Bugfixes
- Fixed a bug where some output wouldn't be streamed properly in streaming chunked responses
- Fixed a bug where the
devicesparam didn't recognize the proper delimiter Client.loginnow properly expands theregistryURL if provided.- Fixed a bug where unicode characters in passed for
environmentincreate_containerwould break.
Miscellaneous
- Several unit tests and integration tests improvements.
Clientconstructor now enforces passing theversionparameter as a string.- Build context files are now ordered by filename when creating the archive (for consistency with docker mainline behavior)
0.6.0
- This version introduces breaking changes!
Breaking changes
- The default SSL protocol is now the highest TLS v1.x (was SSL v2.3 before) (Poodle fix)
- The
historycommand now returns a dict instead of a raw JSON string.
Features
- Added the
executecommand. - Added
pauseandunpausecommands. - Added support fo the
cpusetparam increate_container - Added support for host devices (
devicesparam instart) - Added support for the
tailparam inlogs. - Added support for the
filtersparam inimagesandcontainers - The
kwargs_from_envmethod is now available in thedocker.utilsmodule. This should make it easier for boot2docker user to connect to their daemon.
Bugfixes
- Fixed a bug where empty directories weren't correctly included when
providing a context to
Client.build. - Fixed a bug where UNIX socket connections weren't properly cleaned up,
causing
ResourceWarnings to appear in some cases. - Fixed a bug where docker-py would crash if the docker daemon was stopped while reading a streaming response
- Fixed a bug with streaming responses in Python 3
remove_imagenow supports a dict containing anIdkey as itsidparameter (similar to other methods requiring a resource ID)
Documentation
- Added new MkDocs documentation. Currently hosted on ReadTheDocs
Miscellaneous
- Added tests to sdist
- Added a Makefile for running tests in Docker
- Updated Dockerfile
0.5.3
- Fixed attaching when connecting to the daemon over a UNIX socket.
0.5.2
- Fixed a bug where sockets were closed immediately when attaching over TLS.
0.5.1
- Added a
assert_hostnameoption toTLSConfigwhich can be used to disable verification of hostnames. - Fixed SSL not working due to an incorrect version comparison
- Fixed streams not working on Windows
0.5.0
- This version introduces breaking changes!
- Added
insecure_registryparameter inClient.pushandClient.pull. It defaults to False and code pushing to non-HTTPS private registries might break as a result. - Added support for adding and dropping capabilities
- Added support for restart policy
- Added support for string values in
Client.create_container'smem_limit - Added support for
.dockerignorefile inClient.build
Bugfixes
- Fixed timeout behavior in
Client.stop
Miscellaneous
Client.create_containerprovides better validation of thevolumesparameter- Improved integration tests
0.4.0
- This version introduces breaking changes!
- The
base_urlparameter in theClientconstructor should now allow most of theDOCKER_HOSTenvironment values (except for the fd:// protocol)- As a result, URLs that don't specify a port are now invalid (similar to the official client's behavior)
- Added TLS support (see documentation)
Bugfixes
- Fixed an issue with
Client.buildstreamed logs in Python 3
Miscellaneous
- Added unit tests coverage
- Various integration tests fixes
0.3.2
- Default API version is now 1.12 (support for docker 1.0)
- Added new methods
Client.get_imageandClient.load_image(docker saveanddocker load) - Added new method
Client.ping - Added new method
Client.resize Client.buildcan now be provided with a custom context using thecustom_contextparameter.- Added support for
memswap_limitparameter increate_container - Added support for
forceparameter inremove_container - Added support for
forceandnopruneparameters inremove_image - Added support for
timestampsparameter inlogs - Added support for
dns_searchparameter instart - Added support for
network_modeparameter instart - Added support for
sizeparameter incontainers - Added support for
volumes_fromanddnsparameters instart. As of API version >= 1.10, these parameters no longer belong tocreate_container Client.logsnow uses the logs endpoint when API version is sufficient
Bugfixes
- Fixed a bug in pull where the
repo:tagnotation wasn't interpreted properly - Fixed a bug in streaming methods with python 3 (unicode, bytes/str related)
- Fixed a bug in
Client.startwhere legacy notation for volumes wasn't supported anymore.
Miscellaneous
- The client now raises
DockerExceptions when appropriate. You can importDockerException(and its subclasses) from thedocker.errorsmodule to catch them if needed. docker.APIErrorhas been moved to the newdocker.errorsmodule as well.Client.insertis deprecated in API version > 1.11- Improved integration tests should now run much faster.
- There is now a single source of truth for the docker-py version number.
0.3.1
- Default API version is now 1.9
- Streaming responses no longer yield blank lines.
Client.create_containernow supports thedomainnameparameter.volumes_fromparameter inClient.create_containernow supports iterables.- Auth credentials are provided to the docker daemon when using
Client.build(new feature in API version 1.9)
Bugfixes
- Various fixes for response streams (
logs,pull, etc.). - Fixed a bug with
Client.pushwhen using API version < 1.5 - Fixed a bug with API version checks.
Miscellaneous
mockhas been removed from the runtime requirements.- Added installation instructions in the README.
0.3.0
- This version introduces breaking changes!
- Support for API version 1.7 through 1.9 (Docker 0.8.0+)
- Default API version is now 1.8
- The client has been updated to support Requests 2.x.
requests==2.2.1is now the recommended version. - Links can now be specified as tuples in
Client.start(see docs for more information) - Added support for various options in
Client.create_container(network_disabled,cpu_shares,working_dirandentrypoint) Client.attachhas been reworked to work similarly toClient.logsminus the historical data.- Logs can now be streamed using the
streamparameter. - Added support for
tcp://URLs as clientbase_url. - Various auth improvements.
- Added support for custom
Client.buildtimeout.
Bugfixes
- Fixed a bug where determining the protocol of a private registry would sometimes yield the wrong result.
- Fixed a bug where
Client.copywouldn't accept a dict as argument. - Fixed several streaming bugs.
- Removed unused parameter in
Client.import_image. - The client's
base_urlnow tolerates trailing slashes.
Miscellaneous
- Updated integration tests
- Small doc fixes
0.2.3
- Support for API version 1.6
- Added support for links
- Added support for global request timeout
- Added
signalparameter inClient.kill - Added support for
publish_all_portsinClient.start Client.pull,Client.pushandClient.buildcan be streamed now- Added support for websockets in
Client.attach - Fixed ports for Docker 0.6.5+
- Added
Client.eventsmethod (access to the/eventsendpoint) - Changed the way the ports and volumes are provided in
Client.startandClient.create_container̀to make them simpler and more intuitive.
Bugfixes
- Fixed a bug where private registries on HTTPS weren't handled properly
- Fixed a bug where auth would break with Python 3
Miscellaneous
- Test improvements
- Slight doc improvements
0.2.2
- Added support for the
rmparameter inClient.build - Added support for tarball imports in
Client.import_imagethroughdataparameter. - The
commandparameter inClient.create_containeris now optional (for containers that include a default run command)
Bugfixes
- Fixed Python 3 support
- Fixed a bug where anonymous push/pull would break when no authconfig is present
- Fixed a bug where the
quietparameter wouldn't be taken into account inClient.containers - Fixed a bug where
Client.pushwould break when pushing to private registries. - Removed unused
registryparameter inClient.pull. - Removed obsolete custom error message in
Client.create_container.
Miscellaneous
- docker-py is now unit-tested, and Travis-CI has been enabled on the source repository.
0.2.1
- Improvements to the
tox.inifile
Bugfixes
- Fixed a bug where the package would fail with an
ImportErrorif requests was installed usingapt-get - Fixed a bug where
Client.buildwould fail if given apathparameter. - Fixed several bugs in
Client.login. It should now work with API versions 1.4, 1.5. - Please note that
Client.logincurrently doesn't write auth to the.dockercfgfile, thus auth is not persistent when using this method.
0.2.0
- This version introduces breaking changes!
Client.kill,Client.remove_container,Client.remove_image,Client.restart,Client.start,Client.stopandClient.waitdon't support varargs anymore.- Added commands
Client.topandClient.copy - Added
lxc_confparameter toClient.start - Added support for authentication in
Client.pull(API version >=1.5) - Added support for privileged containers.
- Error management overhaul. The new version should be more consistent and
- All methods that expected a container ID as argument now also support a dict
containing an
Idkey. - Added license header to python files.
- Several
README.mdupdates.
Bugfixes
- Fixed several bugs with auth config parsing.
- Fixed a bug in
Client.pushwhere it would raise an exception if the auth config wasn't loaded. - Fixed a bug in
Client.pullwhere private registry images wouldn't be parsed properly if it contained port information.
0.1.5
Client.buildnow uses tempfiles to store build context instead of storing it in memory- Added
nocacheoption toClient.build Client.remove_containernow raises an exception when trying to remove a running containerClient.create_containernow accepts dicts for theenvironmentparameter
Bugfixes
- Fixed a bug in
Client.create_containeron Python 2.6 where unicode commands would fail to be parsed - Fixed a bug in
Client.buildwhere thetagparameter would not be taken into account
0.1.4
- Added support for API connection through UNIX socket (default for docker 0.5.2+)
0.1.3
- The client now tries to load the auth config from
~/.dockercfg. This is necessary to use the push command if API version is >1.0
0.1.2
- Added a
quiet parametertoClient.build(mirrors theqparameter in the API)
0.1.1
- Fixed a bug where the build command would list tar contents before sending the request
- Fixed a bug in
Client.port
0.1.0
- This version introduces breaking changes!
- Switched to server side build system
- Removed the BuilderClient
- Added support for contextual builds
- Added support for remote URL builds
- Added python 3 support
- Added bind mounts support
- Added API version support
- Fixed a bug where
Client.portwould fail if provided with a port of type number - Fixed a bug where
Client._post_jsonwouldn't set the Content-Type header toapplication/json
0.0.6
- Added support for custom loggers in
Client.build - Added
Client.attachcommand - Added support for
ADDcommand in builder - Fixed a bug in
Client.logs - Improved unit tests
0.0.5
- Added tag support for the builder
- Use
shlexto parse plain string commands when creating a container - Fixed several bugs in the builder
- Fixed the
quietoption inClient.images - Unit tests
0.0.4
- Improved error reporting
0.0.3
- Fixed a bug in
Client.tag - Fixed a bug where generated images would be removed after a successful build
0.0.2
- Implemented first version of the builder client