List of PRs / issues for this release
**
in .dockerignore
would raise an exceptionattach
with the stream
argument set to False
would raise an exceptionList of PRs / issues for this release
squash
parameter in APIClient.build
and DockerClient.images.build
.load_image
will now return a generator of progress as JSON dict
s.remove_image
now returns the content of the API's response.auto_remove
parameter in DockerClient.containers.run
was not taken into account..dockerignore
patterns starting with a slash were ignored.**
patterns in .dockerignore
FROM
a private Docker Hub image when not using a cred store would fail.create_service
or update_service
with task_template
as a dict
would raise an exception.attach
and exec_run
.DockerClient.containers.run
will no longer attempt to stream logs if the log driver doesn't support the operation.docker[tls]
notation.List of PRs / issues for this release
split_port
utility would raise an exception when passed a non-string argument.List of PRs / issues for this release
target
and network_mode
parameters in APIClient.build
and DockerClient.images.build
.runtime
parameter in APIClient.create_container
and DockerClient.containers.run
.ingress
parameter in APIClient.create_network
and DockerClient.networks.create
.placement
configuration in docker.types.TaskTemplate
.tty
configuration in docker.types.ContainerSpec
.start_period
configuration in docker.types.Healthcheck
.credHelpers
section in Docker's configuration file is now recognized.DockerClient
using docker.from_env
wouldn't correctly set the default timeout value.DockerClient.secrets
was not accessible as a property.DockerClient.build
would sometimes return the wrong image.HostConfig.nano_cpus
exceeding 2^32 would raise a type error.Image.tag
now properly returns True
when the operation is successful.APIClient.logs
and Container.logs
now raise an exception if the since
argument uses an unsupported type instead of ignoring the value.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
HostConfig
parameters: volume_driver
, cpu_count
, cpu_percent
, nano_cpus
, cpuset_mems
.verbose
parameter in APIClient.inspect_network
and DockerClient.networks.get
.environment
parameter in APIClient.exec_create
and Container.exec_run
reload_config
method to APIClient
, that lets the user reload the config.json
data from disk.labels
property to the Image
and Container
classes.image
property to the Container
class.replicas
to zero in ServiceMode
would not register as a valid entry.DockerClient.images.build
would report a failure after a successful build if a tag
was set.DockerClient.images.pull
would fail to return the corresponding image object if a tag
was set.mounts
provided to APIClient.create_service
would sometimes be parsed incorrectly.Network.containers
would crash when no containers were associated with the network.Network.connect
and Network.disconnect
would not accept some of the documented parameters.cpuset_cpus
parameter would not be properly set in APIClient.create_host_config
.networks
argument in DockerClient.containers.run
has been replaced with a (working) singular network
argument.List of PRs / issues for this release
status_code
attribute of APIError
exceptions would not reflect the expected value.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
1.26
(Engine 1.13.1+)upgrade_plugin
method to the APIClient
classupgrade
method to the Plugin
classservice_logs
method to the APIClient
classlogs
method to the Service
classdf
method to APIClient
and DockerClient
init
and init_path
parameters in HostConfig
and DockerClient.containers.run
hostname
parameter in ContainerSpec
and DockerClient.service.create
8000-8010:80
)TypeError
events
method in APIClient
and DockerClient
would not respect custom headers set in config.json
List of PRs / issues for this release
APIClient
: prune_containers
, prune_images
, prune_networks
, prune_volumes
DockerClient
: containers.prune
, images.prune
, networks.prune
, volumes.prune
APIClient
: configure_plugin
, create_plugin
, disable_plugin
, enable_plugin
, inspect_plugin
, pull_plugin
, plugins
, plugin_privileges
, push_plugin
, remove_plugin
DockerClient
: plugins.create
, plugins.get
, plugins.install
, plugins.list
, and the Plugin
model.APIClient
: create_secret
, inspect_secret
, remove_secret
, secrets
DockerClient
: secret.create
, secret.get
, secret.list
and the Secret
model.secrets
parameter to ContainerSpec
. Each item in the secrets
list must be a docker.types.SecretReference
instance.cache_from
in APIClient.build
and DockerClient.images.build
.auto_remove
and storage_opt
in APIClient.create_host_config
and DockerClient.containers.run
stop_timeout
in APIClient.create_container
and DockerClient.containers.run
force
parameter in APIClient.remove_volume
and Volume.remove
max_failure_ratio
and monitor
in UpdateConfig
force_update
in TaskTemplate
name
parameter optional in APIClient.create_volume
and DockerClient.volumes.create
AttributeError
.DockerClient.swarm.init
method to take into account arguments passed to it.Image.tag
now correctly returns a boolean value upon completion.volumes
in DockerClient.containers.run
DockerClient.image.build
wouldn't return an Image
object even when the build was successfulList of PRs / issues for this release
docker-py
package is installed in order to prevent obscure naming conflicts when both packages co-exist.filters
parameter to APIClient.networks
.DockerClient
are now hashable.DockerClient
would raise a TypeError
exception.mode
parameter in create_service
is now properly converted to a valid data type for the Engine API. Use ServiceMode
for advanced configurations.APIClient.events
stream would sometimes raise an exception when a container is stopped or restarted.List of PRs / issues for this release
Mount.parse_mount_string
would never set the read_only parameter on the resulting Mount
.Mount.parse_mount_string
would incorrectly mark host binds as being of volume
type.List of PRs / issues for this release
docker.Client
has been renamed to docker.APIClient
docker.from_env
now creates a DockerClient
instance instead of an APIClient
instance.APIClient.start
pip
package is now docker
(was: docker-py
). New versions of this library will only be published as docker
from now on.docker.ssladapter
is now docker.transport.ssladapter
docker.auth
and docker.utils.ports
docker.utils.types
has been moved to docker.types
create_host_config
, create_ipam_pool
and create_ipam_config
have been removed from docker.utils
. They have been replaced by the following classes in docker.types
: HostConfig
, IPAMPool
and IPAMCOnfig
.docker.DockerClient
. See the README and documentation for more information.update_node
method in APIClient
.remove_node
method in APIClient
.restart_policy
in update_container
.labels
and shmsize
in build
.attachable
in create_network
healthcheck
in create_container
.isolation
in HostConfig
.pid_mode
in HostConfig
(now supports arbitrary values for API version >= 1.24).options
in IPAMConfig
HealthCheck
class to docker.types
to be used in create_container
.EndpointSpec
class to docker.types
to be used in create_service
and update_service
.build
if the client used a credentials store.build
.build
on Windows.networks
in create_service
and update_service
wouldn't be properly converted for the engine.endpoint_config
in create_service
and update_service
would be ignored.endpoint_config
in create_service
and update_service
has been deprecated in favor of endpoint_spec
constraints
in a TaskTemplate
object wouldn't be properly converted for the engine.env
in ContainerSpec
would provoke an APIError
when sent to the engine.env_file
containing empty lines in create_container
would raise an exception.detach
was being ignored by exec_start
.List of PRs / issues for this release
NpipeSocket
instance to blocking mode would put it in non-blocking mode and vice-versa.List of PRs / issues for this release
List of PRs / issues for this release
RestartPolicy.condition_types.ON_FAILURE
would yield an invalid value.base_url
had a trailing slash.environment
values in create_container
containing unicode characters would raise an encoding error..dockerignore
would cause some excluded files to appear in the build context on Windows.requests
library.List of PRs / issues for this release
num_pools
parameter in the Client
constructor.List of PRs / issues for this release
List of PRs / issues for this release
List of PRs / issues for this release
Client
constructor.auth_config
in Client.push
.labels
in Client.create_volume
.labels
and enable_ipv6
in Client.create_network
.force
param in Client.disconnect_container_from_network
.pids_limit
, sysctls
, userns_mode
, cpuset_cpus
, cpu_shares
, mem_reservation
and kernel_memory
parameters in Client.create_host_config
.link_local_ips
in create_endpoint_config
.changes
parameter in Client.import_image
.version
parameter in Client.from_env
.Client.build
would crash if the config.json
file contained a HttpHeaders
entry.decode=True
in some streaming methods would crash when the daemon's response had an unexpected format.environment
values with unicode characters weren't handled properly in create_container
.npipe
protocol would sometimes break with ValueError: buffer size must be strictly positive
.npipe
protocol on Windows.List of PRs / issues for this release
npipe://
protocol).Client.create_host_config
. This includes parameters blkio_weight
, blkio_weight_device
, device_read_bps
, device_write_bps
, device_read_iops
and device_write_iops
.internal
param in Client.create_network
.ipv4_address
and ipv6_address
in utils function create_endpoint_config
.Client
constructor. By default, docker-py now also declares itself in the User-Agent
header..dockerignore
files were not being recognized.List of PRs / issues for this release
login()
against the default registry would fail with the 1.10.x enginematch_hostname
function, fixing dependency issues in some environments.List of PRs / issues for this release
Client.update_container
method (Update resource configs of a container)Client.build
tmpfs
support to Client.create_host_config
changes
param in Client.commit
follow
param in Client.logs
check_duplicate
param in Client.create_network
decode
param in Client.push
and Client.pull
docker.from_env
shortcut function. Instantiates a client with kwargs_from_env
kwargs_from_env
now supports an optional environment
parameter. If present, values will be fetched from this dictionary instead of os.environ
subjectAltName
fieldsdocker-py
now uses TLSv1 by default This setting can be overridden using the ssl_version
param in kwargs_from_env
or the TLSConfig
constructortcp
hosts would fail to connect to TLS-enabled endpointscreate_container
would be improperly formattedList of PRs / issues for this release
List of PRs / issues for this release
shm_size
in Client.create_host_config
List of PRs / issues for this release
Client.create_network
Client.exec_create
stop_signal
in Client.create_host_config
base_url
when TLS is enabled.filters
parameter in Client.volumes
would not be applied properly.devices
parameter in Client.create_host_config
would sometimes be misinterpreted.Client
object would sometimes crash if base_url
was unspecified..dockerignore
has been made significantly faster.List of PRs / issues for this release
since
param in Client.logs
(introduced in API version 1.19)DOCKER_CONFIG
environment variable when looking up auth configstream
param in Client.stats
(when set to False
, allows user to retrieve a single snapshot instead of a constant data stream)mem_swappiness
, oom_kill_disable
params in Client.create_host_config
Client.build
through the buildargs
param.Client.create_container
.tail=0
in Client.logs
no longer shows past logs.Client.pull
and Client.push
couldn't handle image names containing a dot.List of PRs / issues for this release
Client.networks
, Client.create_network
, Client.remove_network
, Client.inspect_network
, Client.connect_container_to_network
, Client.disconnect_container_from_network
).Client.volumes
, Client.create_volume
, Client.inspect_volume
, Client.remove_volume
).group_add
parameter in create_host_config
.cpu_quota
and cpu_period
) parameteres in create_host_config
.Client.get_archive
, Client.put_archive
).ps_args
parameter in Client.top
.Client.port
would fail to yield the expected result.Client.port
would be UDP instead of the expected TCP.List of PRs / issues for this release
docker.utils.create_host_config
is deprecated in favor of Client.create_host_config
.utils.parse_env_file
to support env-files. See docs for usage.base_url
)docker.utils.ports.split_port
would break if an open range was provided.base_url
now adapts depending on the OS (better Windows support)Client.create_container
would result in a failure.six
libraryList of PRs / issues for this release
datetime
arguments passed to Client.events
parameters since
and until
are now always considered to be UTC.Client.build
, failing builds that depended on private images.Client.exec_create
can now retrieve the Id
key from a dictionary for its container param.docker.errors.NotFound
. This exception inherits APIError
which was used previously.List of PRs / issues for this release
Client.execute
has been removed in favor of Client.exec_create
and Client.exec_start
.extra_hosts
parameter in host config can now also be provided as a list.memory_limit
and memswap_limit
in host config to comply with recent deprecations.volume_driver
in Client.create_container
mode
key)decode
in Client.build
(decodes JSON stream on the fly)~/.dockercfg
path if not present.$HOME
environment variable.pull
parameter in Client.build
now defaults to False
. Fixes a bug where the default options would try to force a pull of non-remote images.Client.push
and Client.pull
will now raise exceptions if the HTTP status indicates an error.timeout=None
to Client.stop
would result in an exception despite the usecase being valid.git@
to the list of valid prefixes for remote build paths.attach_socket
available on those versions as well.List of PRs / issues for this release
Client.start
method is now deprecated. Please use the host_config
in Client.create_container
instead.privileged
param in Client.exec_create
(only available in API >= 1.19)read_only
param in host_config wasn't handled properly.Client.execute
(this method is still deprecated).cpuset
param in Client.create_container
is also passed as the CpusetCpus
param (Cpuset
deprecated in recent versions of the API)make integration-test
)Client.insert
Client.exec_resize
would be ignored (#576)Client.pull
(#577)List of PRs / issues for this release
Client.execute
is being deprecated in favor of the more dev-friendly Client.exec_start
and Client.exec_create
. It will be removed in 1.3.0exec_create
, exec_start
, exec_inspect
and exec_resize
to client, accurately mirroring the Exec APIauth_config
param to Client.pull
(allows to use one-off credentials for this pull request)ipc_mode
in host config.log_config
param in host config.ulimit
param in host config.Client.build
.None
values to avoid crashing (now raises docker.errors.NullResource
)docker.utils.ports
package.version_info
attribute to the docker
package.Client.port
where absence of a certain key in the container's JSON would raise an error (now just returns None
)trunc
parameter in Client.containers
having no effect (moved functionality to the client)Client.import_image
method.Client.commit
would faildockerfile
param support to Client.build
(mirrors docker build -f
behavior)'auto'
as version
in Client.__init__
, allowing the constructor to autodetect the daemon's API version.decode
parameter would break when using Python 3.x.dockerignore
weren't being handled properlyresolve_authconfig
issues by bringing it closer to Docker Engine's behavior. This should fix all issues encountered with private registry authrequests
version requirement, which should fix most of the SSL issues encountered recently.Client.rename
method (docker rename
)Client.stats
method (docker stats
)read_only
param support to utils.create_host_config
and Client.start
(docker run --read-only
)pid_mode
param support to utils.create_host_config
and Client.start
(docker run --pid='host'
)since
, until
and filters
params to Client.events
.decode
parameter to Client.stats
and Client.events
to decode JSON objects on the fly (False by default).Client.build
to crash when the provided source was a remote source.Client.timeout
is now a public attribute, and users are encouraged to use it when request timeouts need to be changed at runtime.Client.api_version
as a read-only property.memswap_limit
argument in Client.create_container
now accepts string type values similar to mem_limit
(‘6g’, ‘120000k’, etc.)mac_address
in Client.create_container
pull
, push
, logs
, etc.) were unreliable (#300)client.py
, leading to unhelpful exceptions bubbling up (#466)Client.build
would try to close context when externally provided (custom_context == True
) (#458)create_host_config
where empty sequences wouldn't be interpreted properly (#462)resolve_authconfig
tests.setup.py
now indicates a maximum version of requests to work around the boot2docker / assert_hostname
bug.dns
or volumes_from
in Client.start
with API version < 1.10 will now raise an exception (previously only triggered a warning)host_config
in Client.create_container
docker.utils.create_host_config
to help build a proper HostConfig
dictionary.pull
parameter in Client.build
forcerm
parameter in Client.build
extra_hosts
in Client.start
timeout
in Client.wait
.dockercfg
loading in Client.login
(dockercfg_path
argument)devices
param didn't recognize the proper delimiterClient.login
now properly expands the registry
URL if provided.environment
in create_container
would break.Client
constructor now enforces passing the version
parameter as a string.history
command now returns a dict instead of a raw JSON string.execute
command.pause
and unpause
commands.cpuset
param in create_container
devices
param in start
)tail
param in logs
.filters
param in images
and containers
kwargs_from_env
method is now available in the docker.utils
module. This should make it easier for boot2docker user to connect to their daemon.Client.build
.ResourceWarning
s to appear in some cases.remove_image
now supports a dict containing an Id
key as its id
parameter (similar to other methods requiring a resource ID)assert_hostname
option to TLSConfig
which can be used to disable verification of hostnames.insecure_registry
parameter in Client.push
and Client.pull
. It defaults to False and code pushing to non-HTTPS private registries might break as a result.Client.create_container
's mem_limit
.dockerignore
file in Client.build
Client.stop
Client.create_container
provides better validation of the volumes
parameterbase_url
parameter in the Client
constructor should now allow most of the DOCKER_HOST
environment values (except for the fd:// protocol)Client.build
streamed logs in Python 3Client.get_image
and Client.load_image
(docker save
and docker load
)Client.ping
Client.resize
Client.build
can now be provided with a custom context using the custom_context
parameter.memswap_limit
parameter in create_container
force
parameter in remove_container
force
and noprune
parameters in remove_image
timestamps
parameter in logs
dns_search
parameter in start
network_mode
parameter in start
size
parameter in containers
volumes_from
and dns
parameters in start
. As of API version >= 1.10, these parameters no longer belong to create_container
Client.logs
now uses the logs endpoint when API version is sufficientrepo:tag
notation wasn't interpreted properlyClient.start
where legacy notation for volumes wasn't supported anymore.DockerException
s when appropriate. You can import DockerException
(and its subclasses) from the docker.errors
module to catch them if needed.docker.APIError
has been moved to the new docker.errors
module as well.Client.insert
is deprecated in API version > 1.11Client.create_container
now supports the domainname
parameter.volumes_from
parameter in Client.create_container
now supports iterables.Client.build
(new feature in API version 1.9)logs
, pull
, etc.).Client.push
when using API version < 1.5mock
has been removed from the runtime requirements.requests==2.2.1
is now the recommended version.Client.start
(see docs for more information)Client.create_container
(network_disabled
, cpu_shares
, working_dir
and entrypoint
)Client.attach
has been reworked to work similarly to Client.logs
minus the historical data.stream
parameter.tcp://
URLs as client base_url
.Client.build
timeout.Client.copy
wouldn't accept a dict as argument.Client.import_image
.base_url
now tolerates trailing slashes.signal
parameter in Client.kill
publish_all_ports
in Client.start
Client.pull
, Client.push
and Client.build
can be streamed nowClient.attach
Client.events
method (access to the /events
endpoint)Client.start
and Client.create_container̀€
to make them simpler and more intuitive.rm
parameter in Client.build
Client.import_image
through data
parameter.command
parameter in Client.create_container
is now optional (for containers that include a default run command)quiet
parameter wouldn't be taken into account in Client.containers
Client.push
would break when pushing to private registries.registry
parameter in Client.pull
.Client.create_container
.tox.ini
fileImportError
if requests was installed using apt-get
Client.build
would fail if given a path
parameter.Client.login
. It should now work with API versions 1.4, 1.5.Client.login
currently doesn't write auth to the .dockercfg
file, thus auth is not persistent when using this method.Client.kill
, Client.remove_container
, Client.remove_image
, Client.restart
, Client.start
, Client.stop
and Client.wait
don't support varargs anymore.Client.top
and Client.copy
lxc_conf
parameter to Client.start
Client.pull
(API version >=1.5)Id
key.README.md
updates.Client.push
where it would raise an exception if the auth config wasn't loaded.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 memorynocache
option to Client.build
Client.remove_container
now raises an exception when trying to remove a running containerClient.create_container
now accepts dicts for the environment
parameterClient.create_container
on Python 2.6 where unicode commands would fail to be parsedClient.build
where the tag
parameter would not be taken into account~/.dockercfg
. This is necessary to use the push command if API version is >1.0quiet parameter
to Client.build
(mirrors the q
parameter in the API)Client.port
Client.port
would fail if provided with a port of type numberClient._post_json
wouldn't set the Content-Type header to application/json
Client.build
Client.attach
commandADD
command in builderClient.logs
shlex
to parse plain string commands when creating a containerquiet
option in Client.images
Client.tag