List of PRs / issues for this release
- Fixed a bug where the
split_port
utility would raise an exception when passed a non-string argument.
List of PRs / issues for this release
- Added support for the
target
andnetwork_mode
parameters inAPIClient.build
andDockerClient.images.build
. - Added support for the
runtime
parameter inAPIClient.create_container
andDockerClient.containers.run
. - Added support for the
ingress
parameter inAPIClient.create_network
andDockerClient.networks.create
. - Added support for
placement
configuration indocker.types.TaskTemplate
. - Added support for
tty
configuration indocker.types.ContainerSpec
. - Added support for
start_period
configuration indocker.types.Healthcheck
. - The
credHelpers
section in Docker's configuration file is now recognized. - Port specifications including IPv6 endpoints are now supported.
- Fixed a bug where instantiating a
DockerClient
usingdocker.from_env
wouldn't correctly set the default timeout value. - Fixed a bug where
DockerClient.secrets
was not accessible as a property. - Fixed a bug where
DockerClient.build
would sometimes return the wrong image. - Fixed a bug where values for
HostConfig.nano_cpus
exceeding 2^32 would raise a type error. Image.tag
now properly returnsTrue
when the operation is successful.APIClient.logs
andContainer.logs
now raise an exception if thesince
argument uses an unsupported type instead of ignoring the value.- Fixed a bug where some methods would raise a
NullResource
exception when the resource ID was provided using a keyword argument.
APIClient
instances can now be pickled.
List of PRs / issues for this release
- Added support for the following
HostConfig
parameters:volume_driver
,cpu_count
,cpu_percent
,nano_cpus
,cpuset_mems
. - Added support for
verbose
parameter inAPIClient.inspect_network
andDockerClient.networks.get
. - Added support for the
environment
parameter inAPIClient.exec_create
andContainer.exec_run
- Added
reload_config
method toAPIClient
, that lets the user reload theconfig.json
data from disk. - Added
labels
property to theImage
andContainer
classes. - Added
image
property to theContainer
class.
- Fixed a bug where setting
replicas
to zero inServiceMode
would not register as a valid entry. - Fixed a bug where
DockerClient.images.build
would report a failure after a successful build if atag
was set. - Fixed an issue where
DockerClient.images.pull
would fail to return the corresponding image object if atag
was set. - Fixed a bug where a list of
mounts
provided toAPIClient.create_service
would sometimes be parsed incorrectly. - Fixed a bug where calling
Network.containers
would crash when no containers were associated with the network. - Fixed an issue where
Network.connect
andNetwork.disconnect
would not accept some of the documented parameters. - Fixed a bug where the
cpuset_cpus
parameter would not be properly set inAPIClient.create_host_config
.
- The invalid
networks
argument inDockerClient.containers.run
has been replaced with a (working) singularnetwork
argument.
List of PRs / issues for this release
- Fixed a bug where the
status_code
attribute ofAPIError
exceptions would not reflect the expected value. - Fixed an issue where the
events
method would time out unexpectedly if no data was sent by the engine for a given amount of time.
List of PRs / issues for this release
- Default API version has been bumped to
1.26
(Engine 1.13.1+) - Upgrade plugin:
- Added the
upgrade_plugin
method to theAPIClient
class - Added the
upgrade
method to thePlugin
class
- Added the
- Service logs:
- Added the
service_logs
method to theAPIClient
class - Added the
logs
method to theService
class
- Added the
- Added the
df
method toAPIClient
andDockerClient
- Added support for
init
andinit_path
parameters inHostConfig
andDockerClient.containers.run
- Added support for
hostname
parameter inContainerSpec
andDockerClient.service.create
- Added support for port range to single port in port mappings
(e.g.
8000-8010:80
)
- Fixed a bug where a missing container port in a port mapping would raise
an unexpected
TypeError
- Fixed a bug where the
events
method inAPIClient
andDockerClient
would not respect custom headers set inconfig.json
List of PRs / issues for this release
- Added the following pruning methods:
- In
APIClient
:prune_containers
,prune_images
,prune_networks
,prune_volumes
- In
DockerClient
:containers.prune
,images.prune
,networks.prune
,volumes.prune
- In
- Added support for the plugins API:
- In
APIClient
:configure_plugin
,create_plugin
,disable_plugin
,enable_plugin
,inspect_plugin
,pull_plugin
,plugins
,plugin_privileges
,push_plugin
,remove_plugin
- In
DockerClient
:plugins.create
,plugins.get
,plugins.install
,plugins.list
, and thePlugin
model.
- In
- Added support for the secrets API:
- In
APIClient
:create_secret
,inspect_secret
,remove_secret
,secrets
- In
DockerClient
:secret.create
,secret.get
,secret.list
and theSecret
model. - Added
secrets
parameter toContainerSpec
. Each item in thesecrets
list must be adocker.types.SecretReference
instance.
- In
- Added support for
cache_from
inAPIClient.build
andDockerClient.images.build
. - Added support for
auto_remove
andstorage_opt
inAPIClient.create_host_config
andDockerClient.containers.run
- Added support for
stop_timeout
inAPIClient.create_container
andDockerClient.containers.run
- Added support for the
force
parameter inAPIClient.remove_volume
andVolume.remove
- Added support for
max_failure_ratio
andmonitor
inUpdateConfig
- Added support for
force_update
inTaskTemplate
- Made
name
parameter optional inAPIClient.create_volume
andDockerClient.volumes.create
- Fixed a bug where building from a directory containing socket-type files
would raise an unexpected
AttributeError
. - Fixed an issue that was preventing the
DockerClient.swarm.init
method to take into account arguments passed to it. Image.tag
now correctly returns a boolean value upon completion.- Fixed several issues related to passing
volumes
inDockerClient.containers.run
- Fixed an issue where
DockerClient.image.build
wouldn't return anImage
object even when the build was successful
List of PRs / issues for this release
- Installation of the package now fails if the
docker-py
package is installed in order to prevent obscure naming conflicts when both packages co-exist. - Added missing
filters
parameter toAPIClient.networks
. - Resource objects generated by the
DockerClient
are now hashable. - Fixed a bug where retrieving untagged images using
DockerClient
would raise aTypeError
exception. mode
parameter increate_service
is now properly converted to a valid data type for the Engine API. UseServiceMode
for advanced configurations.- Fixed a bug where the decoded
APIClient.events
stream would sometimes raise an exception when a container is stopped or restarted.
List of PRs / issues for this release
- Fixed a bug where forward slashes in some .dockerignore patterns weren't being parsed correctly on Windows
- Fixed a bug where
Mount.parse_mount_string
would never set the read_only parameter on the resultingMount
. - Fixed a bug where
Mount.parse_mount_string
would incorrectly mark host binds as being ofvolume
type.
List of PRs / issues for this release
- Dropped support for Python 2.6
docker.Client
has been renamed todocker.APIClient
docker.from_env
now creates aDockerClient
instance instead of anAPIClient
instance.- Removed HostConfig parameters from
APIClient.start
- The minimum supported API version is now 1.21 (Engine version 1.9.0+)
- The name of the
pip
package is nowdocker
(was:docker-py
). New versions of this library will only be published asdocker
from now on. docker.ssladapter
is nowdocker.transport.ssladapter
- The package structure has been flattened in certain cases, which may affect
import for
docker.auth
anddocker.utils.ports
docker.utils.types
has been moved todocker.types
create_host_config
,create_ipam_pool
andcreate_ipam_config
have been removed fromdocker.utils
. They have been replaced by the following classes indocker.types
:HostConfig
,IPAMPool
andIPAMCOnfig
.
- Added a high-level, user-focused API as
docker.DockerClient
. See the README and documentation for more information. - Implemented
update_node
method inAPIClient
. - Implemented
remove_node
method inAPIClient
. - Added support for
restart_policy
inupdate_container
. - Added support for
labels
andshmsize
inbuild
. - Added support for
attachable
increate_network
- Added support for
healthcheck
increate_container
. - Added support for
isolation
inHostConfig
. - Expanded support for
pid_mode
inHostConfig
(now supports arbitrary values for API version >= 1.24). - Added support for
options
inIPAMConfig
- Added a
HealthCheck
class todocker.types
to be used increate_container
. - Added an
EndpointSpec
class todocker.types
to be used increate_service
andupdate_service
.
- Fixed a bug where auth information would not be properly passed to the engine
during a
build
if the client used a credentials store. - Fixed an issue with some exclusion patterns in
build
. - Fixed an issue where context files were bundled with the wrong permissions
when calling
build
on Windows. - Fixed an issue where auth info would not be retrieved from its default location on Windows.
- Fixed an issue where lists of
networks
increate_service
andupdate_service
wouldn't be properly converted for the engine. - Fixed an issue where
endpoint_config
increate_service
andupdate_service
would be ignored. endpoint_config
increate_service
andupdate_service
has been deprecated in favor ofendpoint_spec
- Fixed a bug where
constraints
in aTaskTemplate
object wouldn't be properly converted for the engine. - Fixed an issue where providing a dictionary for
env
inContainerSpec
would provoke anAPIError
when sent to the engine. - Fixed a bug where providing an
env_file
containing empty lines increate_container
would raise an exception. - Fixed a bug where
detach
was being ignored byexec_start
.
- Documentation for classes and methods is now included alongside the code as docstrings.
List of PRs / issues for this release
- Fixed an issue where setting a
NpipeSocket
instance to blocking mode would put it in non-blocking mode and vice-versa.
List of PRs / issues for this release
- Fixed an issue where concurrent attempts to access to a named pipe by the client would sometimes cause recoverable exceptions to be raised.
List of PRs / issues for this release
- Fixed an issue where
RestartPolicy.condition_types.ON_FAILURE
would yield an invalid value. - Fixed an issue where the SSL connection adapter would receive an invalid argument.
- Fixed an issue that caused the Client to fail to reach API endpoints when
the provided
base_url
had a trailing slash. - Fixed a bug where some
environment
values increate_container
containing unicode characters would raise an encoding error. - Fixed a number of issues tied with named pipe transport on Windows.
- Fixed a bug where inclusion patterns in
.dockerignore
would cause some excluded files to appear in the build context on Windows.
- Adjusted version requirements for the
requests
library. - It is now possible to run the docker-py test suite on Windows.
List of PRs / issues for this release
- Fixed an issue where identity tokens in configuration files weren't handled by the library.
- Increased the default number of connection pools from 10 to 25. This number
can now be configured using the
num_pools
parameter in theClient
constructor.
List of PRs / issues for this release
- Updated the docker-pycreds dependency as it was causing issues for some users with dependency resolution in applications using docker-py.
List of PRs / issues for this release
- The docker.utils.types module was removed in favor of docker.types, but some applications imported it explicitly. It has been re-added with an import warning advising to use the new module path.
List of PRs / issues for this release
- Added swarm mode and service management methods. See the documentation for details.
- Added support for IPv6 Docker host addresses in the
Client
constructor. - Added (read-only) support for the Docker credentials store.
- Added support for custom
auth_config
inClient.push
. - Added support for
labels
inClient.create_volume
. - Added support for
labels
andenable_ipv6
inClient.create_network
. - Added support for
force
param inClient.disconnect_container_from_network
. - Added support for
pids_limit
,sysctls
,userns_mode
,cpuset_cpus
,cpu_shares
,mem_reservation
andkernel_memory
parameters inClient.create_host_config
. - Added support for
link_local_ips
increate_endpoint_config
. - Added support for a
changes
parameter inClient.import_image
. - Added support for a
version
parameter inClient.from_env
.
- Fixed a bug where
Client.build
would crash if theconfig.json
file contained aHttpHeaders
entry. - Fixed a bug where passing
decode=True
in some streaming methods would crash when the daemon's response had an unexpected format. - Fixed a bug where
environment
values with unicode characters weren't handled properly increate_container
. - Fixed a bug where using the
npipe
protocol would sometimes break withValueError: buffer size must be strictly positive
.
- Fixed an issue where URL-quoting in docker-py was inconsistent with the quoting done by the Docker CLI client.
- The client now sends TCP upgrade headers to hint potential proxies about connection hijacking.
- The client now defaults to using the
npipe
protocol on Windows.
List of PRs / issues for this release
- Added experimental support for Windows named pipes (
npipe://
protocol). - Added support for Block IO constraints in
Client.create_host_config
. This includes parametersblkio_weight
,blkio_weight_device
,device_read_bps
,device_write_bps
,device_read_iops
anddevice_write_iops
. - Added support for the
internal
param inClient.create_network
. - Added support for
ipv4_address
andipv6_address
in utils functioncreate_endpoint_config
. - Added support for custom user agent setting in the
Client
constructor. By default, docker-py now also declares itself in theUser-Agent
header.
- Fixed an issue where the HTTP timeout on streaming responses would sometimes be set incorrectly.
- Fixed an issue where explicit relative paths in
.dockerignore
files were not being recognized.
List of PRs / issues for this release
- Fixed a bug where calling
login()
against the default registry would fail with the 1.10.x engine - Fixed a bug where values in environment files would be parsed incorrectly if they contained an equal sign.
- Switched to a better supported backport of the
match_hostname
function, fixing dependency issues in some environments.
List of PRs / issues for this release
- Added
Client.update_container
method (Update resource configs of a container) - Added support for gzipped context in
Client.build
- Added ability to specify IP address when connecting a container to a network
- Added
tmpfs
support toClient.create_host_config
- Added support for the
changes
param inClient.commit
- Added support for the
follow
param inClient.logs
- Added support for the
check_duplicate
param inClient.create_network
- Added support for the
decode
param inClient.push
andClient.pull
- Added
docker.from_env
shortcut function. Instantiates a client withkwargs_from_env
kwargs_from_env
now supports an optionalenvironment
parameter. If present, values will be fetched from this dictionary instead ofos.environ
- Fixed a bug where TLS verification would fail when using IP addresses
in the certificate's
subjectAltName
fields - Fixed an issue where the default TLS version in TLSConfig would
break in some environments.
docker-py
now uses TLSv1 by default This setting can be overridden using thessl_version
param inkwargs_from_env
or theTLSConfig
constructor - Fixed a bug where
tcp
hosts would fail to connect to TLS-enabled endpoints - Fixed a bug where loading a valid docker configuration file would fail
- Fixed a bug where some environment variables specified through
create_container
would be improperly formatted - Fixed a bug where using the unix socket connection would raise an error in some edge-case situations
- Default API version is now 1.22 (introduced in Docker 1.10.0)
List of PRs / issues for this release
- Fixed a bug where TLS verification was improperly executed when providing a custom CA certificate.
List of PRs / issues for this release
- Added support for
shm_size
inClient.create_host_config
- Fixed a bug where Dockerfile would sometimes be excluded from the build context.
- Fixed a bug where a docker config file containing unknown keys would raise an exception.
- Fixed an issue with SSL connections behaving improperly when pyOpenSSL was installed in the same environment.
- Several TLS configuration improvements
List of PRs / issues for this release
- Added support for cusom IPAM configuration in
Client.create_network
- Added input support to
Client.exec_create
- Added support for
stop_signal
inClient.create_host_config
- Added support for custom HTTP headers in Docker config file.
- Added support for unspecified transfer protocol in
base_url
when TLS is enabled.
- Fixed a bug where the
filters
parameter inClient.volumes
would not be applied properly. - Fixed a bug where memory limits would parse to incorrect values.
- Fixed a bug where the
devices
parameter inClient.create_host_config
would sometimes be misinterpreted. - Fixed a bug where instantiating a
Client
object would sometimes crash ifbase_url
was unspecified. - Fixed a bug where an error message related to TLS configuration would link to a non-existent (outdated) docs page.
- Processing of
.dockerignore
has been made significantly faster. - Dropped explicit support for Python 3.2
List of PRs / issues for this release
- Added support for the
since
param inClient.logs
(introduced in API version 1.19) - Added support for the
DOCKER_CONFIG
environment variable when looking up auth config - Added support for the
stream
param 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_disable
params inClient.create_host_config
- Added support for build arguments in
Client.build
through thebuildargs
param.
- 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=0
inClient.logs
no longer shows past logs. - Fixed a bug where
Client.pull
andClient.push
couldn't handle image names containing a dot.
- 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.
List of PRs / issues for this release
- 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_add
parameter increate_host_config
. - Added support for the CPU CFS (
cpu_quota
andcpu_period
) parameteres increate_host_config
. - Added support for the archive API endpoint (
Client.get_archive
,Client.put_archive
). - Added support for
ps_args
parameter inClient.top
.
- Fixed a bug where specifying volume binds with unicode characters would fail.
- Fixed a bug where providing an explicit protocol in
Client.port
would fail to yield the expected result. - Fixed a bug where the priority protocol returned by
Client.port
would be UDP instead of the expected TCP.
- Broke up Client code into several files to facilitate maintenance and contribution.
- Added contributing guidelines to the repository.
List of PRs / issues for this release
docker.utils.create_host_config
is deprecated in favor ofClient.create_host_config
.
- Added
utils.parse_env_file
to 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
- Fixed a bug where exec_inspect would allow invocation when the API version was too low.
- Fixed a bug where
docker.utils.ports.split_port
would 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_url
now adapts depending on the OS (better Windows support) - Fixed a bug where using an integer as the user param in
Client.create_container
would result in a failure.
- Docs fixes
- Integration tests are now run as part of our continuous integration.
- Updated dependency on
six
library
List of PRs / issues for this release
- Fixed a bug where empty chunks in streams was misinterpreted as EOF.
datetime
arguments passed toClient.events
parameterssince
anduntil
are 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_create
can now retrieve theId
key from a dictionary for its container param.
- 404 API status now raises
docker.errors.NotFound
. This exception inheritsAPIError
which was used previously. - Docs fixes
- Test fixes
List of PRs / issues for this release
- As announced in the 1.2.0 release,
Client.execute
has been removed in favor ofClient.exec_create
andClient.exec_start
.
extra_hosts
parameter in host config can now also be provided as a list.- Added support for
memory_limit
andmemswap_limit
in host config to comply with recent deprecations. - Added support for
volume_driver
inClient.create_container
- Added support for advanced modes in volume binds (using the
mode
key) - Added support for
decode
inClient.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
~/.dockercfg
path if not present.
- Configuration file lookup now also work on platforms that don't define a
$HOME
environment variable. - Fixed an issue where pinging a v2 private registry wasn't working properly, preventing users from pushing and pulling.
pull
parameter inClient.build
now 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.push
andClient.pull
will 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=None
toClient.stop
would result in an exception despite the usecase being valid. - Added
git@
to the list of valid prefixes for remote build paths.
- The websocket-client dependency has been updated to a more recent version.
This new version also supports Python 3.x, making
attach_socket
available on those versions as well.
- Various fixes
List of PRs / issues for this release
- Passing host config in the
Client.start
method is now deprecated. Please use thehost_config
inClient.create_container
instead.
- Added support for
privileged
param inClient.exec_create
(only available in API >= 1.19) - Volume binds can now also be specified as a list of strings.
- Fixed a bug where the
read_only
param in host_config wasn't handled properly. - Fixed a bug in
Client.execute
(this method is still deprecated). - The
cpuset
param inClient.create_container
is also passed as theCpusetCpus
param (Cpuset
deprecated 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
- Various fixes
- Fixed a bug where parameters passed to
Client.exec_resize
would be ignored (#576) - Fixed a bug where auth config wouldn't be resolved properly in
Client.pull
(#577)
- Fixed a bug where the check_resource decorator would break with some argument-passing methods. (#573)
List of PRs / issues for this release
Client.execute
is being deprecated in favor of the more dev-friendlyClient.exec_start
andClient.exec_create
. It will be removed in 1.3.0
- Added
exec_create
,exec_start
,exec_inspect
andexec_resize
to client, accurately mirroring the Exec API - Added
auth_config
param toClient.pull
(allows to use one-off credentials for this pull request) - Added support for
ipc_mode
in host config. - Added support for the
log_config
param in host config. - Added support for the
ulimit
param 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
None
values to avoid crashing (now raisesdocker.errors.NullResource
) - Added tools to parse port ranges inside the new
docker.utils.ports
package. - Added a
version_info
attribute to thedocker
package.
- Fixed a bug in
Client.port
where absence of a certain key in the container's JSON would raise an error (now just returnsNone
) - Fixed a bug with the
trunc
parameter inClient.containers
having no effect (moved functionality to the client) - Several improvements have been made to the
Client.import_image
method. - Fixed pushing / pulling to v2 registries
- Fixed a bug where passing a container dictionary to
Client.commit
would fail
- Default API version has been bumped to 1.18 (Docker Engine 1.6.0)
- Several testing coverage improvements
- Docs fixes and improvements
- Added
dockerfile
param support toClient.build
(mirrorsdocker build -f
behavior) - Added the ability to specify
'auto'
asversion
inClient.__init__
, allowing the constructor to autodetect the daemon's API version.
- Fixed a bug where decoding a result stream using the
decode
parameter would break when using Python 3.x - Fixed a bug where some files in
.dockerignore
weren't being handled properly - Fixed
resolve_authconfig
issues 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
requests
version requirement, which should fix most of the SSL issues encountered recently.
- Several integration test improvements.
- Fixed some unclosed resources in unit tests.
- Several docs improvements.
- Added new
Client.rename
method (docker rename
) - Added now
Client.stats
method (docker stats
) - Added
read_only
param support toutils.create_host_config
andClient.start
(docker run --read-only
) - Added
pid_mode
param support toutils.create_host_config
andClient.start
(docker run --pid='host'
) - Added
since
,until
andfilters
params toClient.events
. - Added
decode
parameter toClient.stats
andClient.events
to decode JSON objects on the fly (False by default).
- Fixed a bug that caused
Client.build
to crash when the provided source was a remote source.
- Default API version has been bumped to 1.17 (Docker Engine 1.5.0)
Client.timeout
is now a public attribute, and users are encouraged to use it when request timeouts need to be changed at runtime.- Added
Client.api_version
as a read-only property. - The
memswap_limit
argument inClient.create_container
now accepts string type values similar tomem_limit
('6g', '120000k', etc.) - Improved documentation
- Added support for
mac_address
inClient.create_container
- 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.build
would try to close context when externally provided (custom_context == True
) (#458) - Fixed an issue in
create_host_config
where empty sequences wouldn't be interpreted properly (#462)
- Added
resolve_authconfig
tests.
setup.py
now indicates a maximum version of requests to work around the boot2docker /assert_hostname
bug.- 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.
- Small doc fixes
- Passing
dns
orvolumes_from
inClient.start
with API version < 1.10 will now raise an exception (previously only triggered a warning)
- Added support for
host_config
inClient.create_container
- Added utility method
docker.utils.create_host_config
to help build a properHostConfig
dictionary. - Added support for the
pull
parameter inClient.build
- Added support for the
forcerm
parameter inClient.build
- Added support for
extra_hosts
inClient.start
- Added support for a custom
timeout
inClient.wait
- Added support for custom
.dockercfg
loading inClient.login
(dockercfg_path
argument)
- Fixed a bug where some output wouldn't be streamed properly in streaming chunked responses
- Fixed a bug where the
devices
param didn't recognize the proper delimiter Client.login
now properly expands theregistry
URL if provided.- Fixed a bug where unicode characters in passed for
environment
increate_container
would break.
- Several unit tests and integration tests improvements.
Client
constructor now enforces passing theversion
parameter as a string.- Build context files are now ordered by filename when creating the archive (for consistency with docker mainline behavior)
- This version introduces breaking changes!
- The default SSL protocol is now the highest TLS v1.x (was SSL v2.3 before) (Poodle fix)
- The
history
command now returns a dict instead of a raw JSON string.
- Added the
execute
command. - Added
pause
andunpause
commands. - Added support fo the
cpuset
param increate_container
- Added support for host devices (
devices
param instart
) - Added support for the
tail
param inlogs
. - Added support for the
filters
param inimages
andcontainers
- The
kwargs_from_env
method is now available in thedocker.utils
module. This should make it easier for boot2docker user to connect to their daemon.
- 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
ResourceWarning
s 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_image
now supports a dict containing anId
key as itsid
parameter (similar to other methods requiring a resource ID)
- Added new MkDocs documentation. Currently hosted on ReadTheDocs
- Added tests to sdist
- Added a Makefile for running tests in Docker
- Updated Dockerfile
- Fixed attaching when connecting to the daemon over a UNIX socket.
- Fixed a bug where sockets were closed immediately when attaching over TLS.
- Added a
assert_hostname
option toTLSConfig
which can be used to disable verification of hostnames. - Fixed SSL not working due to an incorrect version comparison
- Fixed streams not working on Windows
- This version introduces breaking changes!
- Added
insecure_registry
parameter inClient.push
andClient.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
.dockerignore
file inClient.build
- Fixed timeout behavior in
Client.stop
Client.create_container
provides better validation of thevolumes
parameter- Improved integration tests
- This version introduces breaking changes!
- The
base_url
parameter in theClient
constructor should now allow most of theDOCKER_HOST
environment 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)
- Fixed an issue with
Client.build
streamed logs in Python 3
- Added unit tests coverage
- Various integration tests fixes
- Default API version is now 1.12 (support for docker 1.0)
- Added new methods
Client.get_image
andClient.load_image
(docker save
anddocker load
) - Added new method
Client.ping
- Added new method
Client.resize
Client.build
can now be provided with a custom context using thecustom_context
parameter.- Added support for
memswap_limit
parameter increate_container
- Added support for
force
parameter inremove_container
- Added support for
force
andnoprune
parameters inremove_image
- Added support for
timestamps
parameter inlogs
- Added support for
dns_search
parameter instart
- Added support for
network_mode
parameter instart
- Added support for
size
parameter incontainers
- Added support for
volumes_from
anddns
parameters instart
. As of API version >= 1.10, these parameters no longer belong tocreate_container
Client.logs
now uses the logs endpoint when API version is sufficient
- Fixed a bug in pull where the
repo:tag
notation wasn't interpreted properly - Fixed a bug in streaming methods with python 3 (unicode, bytes/str related)
- Fixed a bug in
Client.start
where legacy notation for volumes wasn't supported anymore.
- The client now raises
DockerException
s when appropriate. You can importDockerException
(and its subclasses) from thedocker.errors
module to catch them if needed. docker.APIError
has been moved to the newdocker.errors
module as well.Client.insert
is 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.
- Default API version is now 1.9
- Streaming responses no longer yield blank lines.
Client.create_container
now supports thedomainname
parameter.volumes_from
parameter inClient.create_container
now supports iterables.- Auth credentials are provided to the docker daemon when using
Client.build
(new feature in API version 1.9)
- Various fixes for response streams (
logs
,pull
, etc.). - Fixed a bug with
Client.push
when using API version < 1.5 - Fixed a bug with API version checks.
mock
has been removed from the runtime requirements.- Added installation instructions in the README.
- 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.1
is 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_dir
andentrypoint
) Client.attach
has been reworked to work similarly toClient.logs
minus the historical data.- Logs can now be streamed using the
stream
parameter. - Added support for
tcp://
URLs as clientbase_url
. - Various auth improvements.
- Added support for custom
Client.build
timeout.
- Fixed a bug where determining the protocol of a private registry would sometimes yield the wrong result.
- Fixed a bug where
Client.copy
wouldn't accept a dict as argument. - Fixed several streaming bugs.
- Removed unused parameter in
Client.import_image
. - The client's
base_url
now tolerates trailing slashes.
- Updated integration tests
- Small doc fixes
- Support for API version 1.6
- Added support for links
- Added support for global request timeout
- Added
signal
parameter inClient.kill
- Added support for
publish_all_ports
inClient.start
Client.pull
,Client.push
andClient.build
can be streamed now- Added support for websockets in
Client.attach
- Fixed ports for Docker 0.6.5+
- Added
Client.events
method (access to the/events
endpoint) - Changed the way the ports and volumes are provided in
Client.start
andClient.create_container̀
to make them simpler and more intuitive.
- Fixed a bug where private registries on HTTPS weren't handled properly
- Fixed a bug where auth would break with Python 3
- Test improvements
- Slight doc improvements
- Added support for the
rm
parameter inClient.build
- Added support for tarball imports in
Client.import_image
throughdata
parameter. - The
command
parameter inClient.create_container
is now optional (for containers that include a default run command)
- Fixed Python 3 support
- Fixed a bug where anonymous push/pull would break when no authconfig is present
- Fixed a bug where the
quiet
parameter wouldn't be taken into account inClient.containers
- Fixed a bug where
Client.push
would break when pushing to private registries. - Removed unused
registry
parameter inClient.pull
. - Removed obsolete custom error message in
Client.create_container
.
- docker-py is now unit-tested, and Travis-CI has been enabled on the source repository.
- Improvements to the
tox.ini
file
- Fixed a bug where the package would fail with an
ImportError
if requests was installed usingapt-get
- Fixed a bug where
Client.build
would fail if given apath
parameter. - Fixed several bugs in
Client.login
. It should now work with API versions 1.4, 1.5. - Please note that
Client.login
currently doesn't write auth to the.dockercfg
file, thus auth is not persistent when using this method.
- This version introduces breaking changes!
Client.kill
,Client.remove_container
,Client.remove_image
,Client.restart
,Client.start
,Client.stop
andClient.wait
don't support varargs anymore.- Added commands
Client.top
andClient.copy
- Added
lxc_conf
parameter 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
Id
key. - Added license header to python files.
- Several
README.md
updates.
- Fixed several bugs with auth config parsing.
- Fixed a bug in
Client.push
where it would raise an exception if the auth config wasn't loaded. - Fixed a bug in
Client.pull
where private registry images wouldn't be parsed properly if it contained port information.
Client.build
now uses tempfiles to store build context instead of storing it in memory- Added
nocache
option toClient.build
Client.remove_container
now raises an exception when trying to remove a running containerClient.create_container
now accepts dicts for theenvironment
parameter
- Fixed a bug in
Client.create_container
on Python 2.6 where unicode commands would fail to be parsed - Fixed a bug in
Client.build
where thetag
parameter would not be taken into account
- Added support for API connection through UNIX socket (default for docker 0.5.2+)
- 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
- Added a
quiet parameter
toClient.build
(mirrors theq
parameter in the API)
- Fixed a bug where the build command would list tar contents before sending the request
- Fixed a bug in
Client.port
- 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.port
would fail if provided with a port of type number - Fixed a bug where
Client._post_json
wouldn't set the Content-Type header toapplication/json
- Added support for custom loggers in
Client.build
- Added
Client.attach
command - Added support for
ADD
command in builder - Fixed a bug in
Client.logs
- Improved unit tests
- Added tag support for the builder
- Use
shlex
to parse plain string commands when creating a container - Fixed several bugs in the builder
- Fixed the
quiet
option inClient.images
- Unit tests
- Improved error reporting
- Fixed a bug in
Client.tag
- Fixed a bug where generated images would be removed after a successful build
- Implemented first version of the builder client