Veli-Matti Lintu
fc6773d673
Commit d798afca
made changes for the handling of '**' patterns in
...
.dockerignore. This causes an IndexError with patterns ending
with '**', e.g. 'subdir/**'. This adds a missing boundary check
before checking for trailing '/'.
Signed-off-by: Veli-Matti Lintu <veli-matti.lintu@nosto.com>
2017-08-22 17:00:11 -07:00
Veli-Matti Lintu
3df0653493
Commit d798afca
made changes for the handling of '**' patterns in
...
.dockerignore. This causes an IndexError with patterns ending
with '**', e.g. 'subdir/**'. This adds a missing boundary check
before checking for trailing '/'.
Signed-off-by: Veli-Matti Lintu <veli-matti.lintu@nosto.com>
2017-08-21 12:01:50 -07:00
Joffrey F
d9df2a8b75
Fix handling of non-multiplexed (TTY) streams over upgraded sockets
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-08-17 13:38:40 -07:00
David Steines
6b59dc6271
Allow detach and remove for api version >= 1.25 and use auto_remove when both are set. Continue raising an exception for api versions <1.25.
...
Signed-off-by: David Steines <d.steines@gmail.com>
2017-08-17 13:38:40 -07:00
Joffrey F
7f5739dc02
Leading slash in .dockerignore should be ignored
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-08-17 13:38:40 -07:00
Joffrey F
7139e2d8f1
Return generator for output of load_image endpoint
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-08-17 13:38:40 -07:00
Artem Bolshakov
62fda980e4
client.containers.run returns None if none of json-file or journald logging drivers used
...
Signed-off-by: Artem Bolshakov <either.free@gmail.com>
2017-08-17 13:38:40 -07:00
Jakub Goszczurny
bf9d06db25
Generating regexp from .dockerignore file in a similar way as docker-ce.
...
Signed-off-by: Jakub Goszczurny <szczurmys@o2.pl>
2017-08-17 13:38:40 -07:00
Matthew Berry
a23cd3d8e8
Fix #1673 check resource error in container network API
...
Container network functions checked 'image' as resource ID and not
'container'. This caused a traceback when using container as named
argument.
Signed-off-by: Matthew Berry <mtberry89@gmail.com>
2017-08-17 13:38:40 -07:00
Joffrey F
13b9349216
Fix handling of non-multiplexed (TTY) streams over upgraded sockets
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-08-17 12:02:59 -07:00
David Steines
e17a545aa5
Allow detach and remove for api version >= 1.25 and use auto_remove when both are set. Continue raising an exception for api versions <1.25.
...
Signed-off-by: David Steines <d.steines@gmail.com>
2017-08-15 17:38:34 -07:00
Joffrey F
92a2e48e17
Leading slash in .dockerignore should be ignored
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-08-15 15:40:16 -07:00
Joffrey F
5e4a69bbda
Return generator for output of load_image endpoint
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-08-15 14:58:29 -07:00
Tzu-Chiao Yeh
d74f1bc380
Fix #1575 - Add cpu_rt_period and cpu_rt_runtime args
...
Add cpu_rt_period and cpu_rt_runtime in hostconfig with version(1.25), types(int) checks.
Also add version and type checks in dockertype unit test.
Signed-off-by: Tzu-Chiao Yeh <su3g4284zo6y7@gmail.com>
2017-08-13 09:01:50 +00:00
Artem Bolshakov
b8fd821336
client.containers.run returns None if none of json-file or journald logging drivers used
...
Signed-off-by: Artem Bolshakov <either.free@gmail.com>
2017-08-07 12:02:02 -07:00
Jakub Goszczurny
d798afca7e
Generating regexp from .dockerignore file in a similar way as docker-ce.
...
Signed-off-by: Jakub Goszczurny <szczurmys@o2.pl>
2017-08-01 13:47:45 -07:00
Matthew Berry
c9960c78b0
Fix #1673 check resource error in container network API
...
Container network functions checked 'image' as resource ID and not
'container'. This caused a traceback when using container as named
argument.
Signed-off-by: Matthew Berry <mtberry89@gmail.com>
2017-07-14 09:31:16 -07:00
Joffrey F
50a60717f0
split_port should not break when passed a non-string argument
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-06-28 12:22:34 -07:00
Joffrey F
a8722fb0c2
split_port should not break when passed a non-string argument
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-06-28 12:06:03 -07:00
Joffrey F
320c810471
Support credHelpers section in config.json
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-06-22 11:51:31 -07:00
Joffrey F
87d5cd1b0a
Merge pull request #1632 from kaiyou/master
...
allow ipv6 :: notation in split_port (using re)
2017-06-16 11:57:52 -07:00
Chris Mark
c03a009e2d
Raising error in case of invalid value of since kwarg on Container.logs
...
Signed-off-by: Chris Mark <chrismarkou92@gmail.com>
2017-06-16 18:30:24 +03:00
grahamlyons
ee75a1c2e3
Ensure default timeout is used by API Client
...
The `from_env` method on the `docker` module passed `None` as the
value for the `timeout` keyword argument which overrode the default
value in the initialiser, taken from `constants` module.
This sets the default in the initialiser to `None` and adds logic
to set that, in the same way that `version` is handled.
Signed-off-by: grahamlyons <graham@grahamlyons.com>
2017-06-08 14:39:17 +01:00
kaiyou
0c1271350d
Add a specific unit test for splitting port with IPv6
...
The test was copied from ccec87ca2c
Signed-off-by: kaiyou <pierre@jaury.eu>
2017-06-05 18:21:33 +02:00
Joffrey F
95297dc2e7
Replace erroneous networks argument in containers.run with singular
...
network equivalent.
Small docfixes
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-05-12 14:28:27 -07:00
Joffrey F
c6ddea469f
Include tag in images.get after pulling if provided separately
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-05-09 12:24:40 -07:00
Joffrey F
f27ecf3f88
Add ContainerSpec mounts test
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-05-08 14:13:59 -07:00
Joffrey F
13dfb13858
Merge branch 'add-env-support-to-exec' of https://github.com/TomasTomecek/docker-py into TomasTomecek-add-env-support-to-exec
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-05-02 16:38:40 -07:00
Dan Liew
2a0a7adece
Fix typo s/CpuSetCpus/CpusetCpus/
...
According to Docker's API documentation [1]. The parameter name
is `CpusetCpus` not `CpuSetCpus`.
[1] https://docs.docker.com/engine/api/v1.25/#operation/ContainerCreate
Signed-off-by: Dan Liew <daniel.liew@imperial.ac.uk>
2017-05-01 14:56:40 +01:00
Dan Liew
b9ca8755bb
Add missing support for `CpusetMems` parameter to HostConfig.
...
Signed-off-by: Dan Liew <daniel.liew@imperial.ac.uk>
2017-05-01 14:56:40 +01:00
Tomas Tomecek
4633dac580
exec: add support for `Env`
...
Signed-off-by: Tomas Tomecek <ttomecek@redhat.com>
2017-04-29 08:56:51 +02:00
Joffrey F
72b9b72359
Merge pull request #1570 from AlexeyRokhin/master
...
Add cpu_count, cpu_percent, nano_cpus parameters to container HostConfig.
2017-04-28 14:16:25 -07:00
Alexey Rokhin
c2f83d558e
cpus renamed to nano_cpus. Type and scale of nano_cpus are changed. Comments for new parameters are changed.
...
Signed-off-by: Alexey Rokhin <arokhin@mail.ru>
2017-04-28 15:55:44 +03:00
Joffrey F
d19572aae3
Merge pull request #1493 from funkyfuture/model_properties
...
Adds a few model properties
2017-04-27 16:21:02 -07:00
Rob Kooper
5f9a599b0f
Fix if replicas is set to 0, Fixes #1572
...
Signed-off-by: Rob Kooper <kooper@illinois.edu>
2017-04-26 22:50:17 -05:00
Alexey Rokhin
3f7d622143
Add cpu_count, cpu_percent, cpus parameters to container HostConfig.
...
Signed-off-by: Alexey Rokhin <arokhin@mail.ru>
2017-04-19 15:07:02 +03:00
Frank Sachsenheim
659090fc99
Adds an 'image' property to the container model
...
Signed-off-by: Frank Sachsenheim <funkyfuture@riseup.net>
2017-04-15 15:46:52 +02:00
Frank Sachsenheim
b585ec59a8
Adds a 'labels' property to the image model
...
Signed-off-by: Frank Sachsenheim <funkyfuture@riseup.net>
2017-04-15 15:46:52 +02:00
Frank Sachsenheim
1cd56b9f0c
Adds a 'labels' property to the container model
...
The Docker API seems to respond with a 'null' value for the 'Labels'
attribute from containers that were created with older Docker versions.
An empty dictionary is returned in this case.
Signed-off-by: Frank Sachsenheim <funkyfuture@riseup.net>
2017-04-15 15:46:52 +02:00
Joffrey F
79edcc28f7
Add support for volume_driver in HostConfig
...
Some cleanup in ContainerConfig + warning if volume_driver is provided (API>1.20)
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-04-05 17:05:08 -07:00
Joffrey F
73d8097b3d
Fix test issues
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-03-29 15:39:48 -07:00
Joffrey F
c5d35026ce
Set infinite timeout for the `events` method
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-03-27 15:57:36 -07:00
alex-dr
e0e7404380
Fix APIError status_code property for client/server errors
...
requests.Response objects evaluate as falsy when the status_code
attribute is in the 400-500 range. Therefore we are assured that
prior to this change, APIError would show `is_server_error() == False`
when generated with a 500-level response and `is_client_error() == False`
when generated with a 400-level response. This is not desirable.
Added some seemingly dry (not DRY) unit tests to ensure nothing silly
slips back in here.
Signed-off-by: alex-dr <alex@datarobot.com>
2017-03-22 00:49:07 -04:00
Joffrey F
54b3c364cb
Raise an error when passing an empty string to split_port
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-03-09 16:12:48 -08:00
Lei Gong
eba20084f6
fix: Missing exception handling in split_port when no container port
...
"localhost:host_port:" case will raise TypeError exception directly
Catch the "TypeError" and give proper error message
* docker/utils/ports.py
Signed-off-by: Lei Gong <xue177125184@gmail.com>
2017-03-09 16:28:34 +08:00
Joffrey F
f387ae46d7
Merge pull request #1467 from crierr/master
...
Allow port range like 8000-8010:80
2017-02-22 15:27:42 -08:00
Joffrey F
f9f77c4c2f
Merge pull request #1473 from Anvil/event-http-headers
...
Allow events daemon command to read config.json
2017-02-21 12:11:58 -08:00
Damien Nadé
f36ef399ad
Fixed events command related unit tests by passing a timeout value
...
Signed-off-by: Damien Nadé <github@livna.org>
2017-02-21 18:21:10 +01:00
crierr
cfc11515bc
Allow port range like 8000-8010:80
...
Signed-off-by: SeungJin Oh <crierr@naver.com>
2017-02-20 02:09:33 +09:00
Nils Krabshuis
44c31e47e0
Add ability to set 'Hostname' on a Service.
...
Signed-off-by: Nils Krabshuis <nils.krabshuis@redwood.com>
2017-02-19 06:18:26 +01:00
Joffrey F
afcbeb5e4f
Merge pull request #1449 from shin-/secrets-api
...
Implement secrets API
2017-02-15 18:08:25 -08:00
Joffrey F
20c6fe31e0
Add support for recursive wildcard pattern in .dockerignore
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-02-14 18:29:37 -08:00
Joffrey F
e8a86e40cc
Add tests for secret API implementation
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-02-13 17:06:25 -08:00
Ben Firshman
f83993de0a
Fix passing volumes to run with no host path
...
Technically we shouldn't be passing them as binds, but the daemon
doesn't seem to mind.
Fixes #1380
Signed-off-by: Ben Firshman <ben@firshman.co.uk>
2017-02-07 19:22:36 +01:00
Ben Firshman
956fe1cac1
Fix volume path passed by run to create_container
...
Seems like this is pretty much ignored by Docker, so it wasn't
causing any visible issues, except when a volume name was used
instead of a path.
Also, added integration tests.
Ref #1380
Signed-off-by: Ben Firshman <ben@firshman.co.uk>
2017-02-07 19:22:35 +01:00
Joffrey F
08aac9d571
Merge pull request #1341 from pacoxu/patch-1
...
Scope is added in volume after docker 1.12
2017-01-30 11:59:00 -08:00
Joffrey F
e87ed38f69
Ignore socket files in utils.tar
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-01-24 18:00:42 -08:00
Joffrey F
06e8081799
Convert mode argument to valid structure in create_service
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-01-19 16:23:32 -08:00
Joffrey F
bb665257ed
Merge pull request #1393 from aebm/master
...
Fix #1351
2017-01-19 11:55:14 -08:00
Ben Firshman
468bb1c545
Merge pull request #1347 from fcurella/hash
...
Make resources hashable, so that they can be added to `set`s
2017-01-18 16:49:35 +01:00
Alejandro E. Brito Monedero
95b6fddd14
Fix #1351
...
* Fix TypeError when getting the tags property from an image that has
no tags. Ex: An image pulled by cryptohash. It is handled like when
the image doesn't have defined the RepoTags member.
Signed-off-by: Alejandro E. Brito Monedero <alejandro.monedero@gmail.com>
2017-01-16 08:48:41 +01:00
Joffrey F
40089a781c
Detect mount type in parse_mount_string
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-01-09 15:13:09 -08:00
Joffrey F
a960731999
Additional parse_mount_string tests
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-01-09 14:33:58 -08:00
Joffrey F
155b95d143
Merge branch 'dz-fix-mount_options' of https://github.com/dzimine/docker-py into dzimine-dz-fix-mount_options
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-01-09 14:19:25 -08:00
Joffrey F
9450442c8c
Accept / as a path separator in dockerignore patterns on all platforms
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-01-06 16:37:15 -08:00
Dmitri
59ccd8a782
Fix readonly in mounts.
...
Signed-off-by: Dmitri Zimine dz@stackstorm.com
2016-12-28 23:43:15 -08:00
Flavio Curella
6f239fbf29
Make resources hashable, so that they can be added to `set`s
...
Signed-off-by: Flavio Curella <flavio.curella@gmail.com>
2016-12-08 12:19:30 -06:00
徐俊杰
b9c48dca2c
Scope is added in volume after docker 1.12
...
Signed-off-by: pacoxu <paco.xu@daocloud.io>
add ut test for volume scope and no specified name create
Signed-off-by: Paco Xu <paco.xu@daocloud.io>
try to fix ut failure of volume creation
Signed-off-by: Paco Xu <paco.xu@daocloud.io>
try to fix ut failure of volume creation
Signed-off-by: Paco Xu <paco.xu@daocloud.io>
Scope is added in volume after docker 1.12
Signed-off-by: pacoxu <paco.xu@daocloud.io>
Scope is added in volume after docker 1.12
Signed-off-by: pacoxu <paco.xu@daocloud.io>
2016-12-08 10:31:44 +08:00
Joffrey F
c02493cf18
Merge pull request #1331 from aanand/fix-auth-config-path-windows
...
Fix auth config path on Windows
2016-12-02 18:07:08 -08:00
Joffrey F
d56b2d3dc8
Merge pull request #1315 from bfirsh/rename-docker-py-to-docker-sdk-python
...
Start to rename docker-py to docker-sdk-python
2016-12-02 15:20:34 -08:00
Joffrey F
fd4c01aa99
Merge branch 'master' of https://github.com/walkerlee/docker-py into walkerlee-master
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-12-02 14:57:57 -08:00
Aanand Prasad
fb4969f744
Fix auth config path on Windows
...
The Engine client looks *only* at the USERPROFILE environment variable
on Windows, so we should do that too.
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2016-12-02 18:02:09 +00:00
Ben Firshman
dfa4b76989
Merge pull request #1328 from docker/ssladapter_transport_module
...
Move ssladapter to transport module
2016-12-02 14:44:03 +00:00
Joffrey F
4539644667
Move ssladapter to transport module
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-12-01 18:04:40 -08:00
Joffrey F
01c33c0f68
Client -> DockerClient
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-12-01 18:02:16 -08:00
Joffrey F
993f298e85
Move config type creation from docker.utils functions to classes in
...
docker.types
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-12-01 16:06:41 -08:00
Ben Firshman
e7d78d10f6
Merge pull request #1303 from aanand/helpful-containers-warning
...
Show a helpful warning when people try to call `client.containers()`
2016-12-01 11:11:46 +00:00
Joffrey F
239673a51c
Merge pull request #1308 from docker/docker_client
...
Rename Client -> DockerClient
2016-11-30 15:30:40 -08:00
Ben Firshman
6a16edee3e
Merge pull request #1277 from bodnarbm/do-not-traverse-ignored-directories-with-no-potential-exceptions
...
Do not traverse excluded directories that are not prefixes of dockerignore exceptions.
2016-11-29 10:09:43 +00:00
Joffrey F
f5ac10c469
Rename Client -> DockerClient
...
Replace references to old Client with APIClient
Moved contents of services.md to appropriate locations
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-11-28 15:28:04 -08:00
Joffrey F
9643253c50
Merge pull request #1297 from docker/stepanstipl-allow_custom_pid_mode
...
Allow custom pid mode
2016-11-28 14:00:07 -08:00
Joffrey F
75e9d357f7
Merge pull request #1309 from bfirsh/remove-maintainer-from-dockerfiles
...
Remove MAINTAINER from Dockerfiles
2016-11-28 13:14:40 -08:00
Joffrey F
4e08a5cb9e
Merge pull request #1317 from bfirsh/fix-environment-variable-file-with-new-lines
...
Fix parsing for an environment file with newlines
2016-11-28 12:06:38 -08:00
Joffrey F
44e57fb95d
Re-enable pid_mode checks for API < 1.24
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-11-28 12:01:25 -08:00
Aanand Prasad
8c27dd5233
Show a helpful warning when people try to call `client.containers()`
...
People upgrading to docker-py 2.0 without being aware of the new client
API will likely try to call the old `containers()` method. This adds a
helpful warning telling them to use APIClient to get the old API.
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2016-11-28 19:43:49 +00:00
Jon Cotton
4a7c772daf
Fix parsing for an environment file with newlines
...
Fixes the new, purposely broken test added in the previous commit.
Signed-off-by: Jon Cotton <jc@finaltransfer.net>
2016-11-28 19:41:13 +00:00
Joffrey F
5eacb986d7
Remove support for host_config in Client.start
...
Any additional arguments passed to start will raise a
DeprecatedMethod (DockerException) exception.
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-11-28 18:34:09 +00:00
Ben Firshman
94083f25ac
Start to rename docker-py to docker-sdk-python
...
Pretty much everything except renaming the GitHub repo and
documentation, which is not actually done yet. Nearer the release
we can do a search/replace for all that stuff.
Ref #1310
Signed-off-by: Ben Firshman <ben@firshman.co.uk>
2016-11-28 16:45:59 +00:00
Brandon Bodnar
9fc8b3a730
Add unit tests for should_check_directory.
...
Signed-off-by: Brandon Bodnar <bodnarbm@gmail.com>
2016-11-26 21:36:54 -05:00
Ben Firshman
b4c02393b2
Remove MAINTAINER from Dockerfiles
...
It was deprecated in https://github.com/docker/docker/pull/25466
(Sorry @shin- ;)
Signed-off-by: Ben Firshman <ben@firshman.co.uk>
2016-11-24 13:32:20 +00:00
Ben Firshman
b5f7d380d0
Add helpful error for APIClient methods on Client
...
Signed-off-by: Ben Firshman <ben@firshman.co.uk>
2016-11-22 17:05:43 +00:00
Ben Firshman
1984f68730
Add new user-focused API
...
See #1086
Signed-off-by: Ben Firshman <ben@firshman.co.uk>
2016-11-22 17:05:43 +00:00
Ben Firshman
39900c558c
Move APIClient tests into single file
...
For some reason this was spread across two files.
Signed-off-by: Ben Firshman <ben@firshman.co.uk>
2016-11-22 17:03:04 +00:00
Ben Firshman
e055a1c813
Rename DockerClientTest to BaseAPIClientTest
...
Signed-off-by: Ben Firshman <ben@firshman.co.uk>
2016-11-22 17:03:04 +00:00
Ben Firshman
9daa320454
Rename Client to APIClient
...
Signed-off-by: Ben Firshman <ben@firshman.co.uk>
2016-11-22 17:03:03 +00:00
Ben Firshman
d5bc7dc99a
Drop support for Python 2.6
...
Because it's ancient. If you're still using it, you can use an old
version of docker-py.
Signed-off-by: Ben Firshman <ben@firshman.co.uk>
2016-11-22 17:03:03 +00:00
Ben Firshman
19eefcf705
Make docker.ssladaptor a single file
...
Signed-off-by: Ben Firshman <ben@firshman.co.uk>
2016-11-22 17:03:03 +00:00
Ben Firshman
2c9d1110f0
Make docker.auth a single file
...
Signed-off-by: Ben Firshman <ben@firshman.co.uk>
2016-11-22 17:03:03 +00:00
Joffrey F
f12b618ee9
Merge pull request #1236 from docker/host_config_isolation
...
Add support for isolation param in host config
2016-11-17 17:42:57 -08:00
Joffrey F
f262dd6da9
Merge pull request #1281 from TomasTomecek/1265-ssl-test-no-sslX-support-in-openssl
...
ssl,test: OpenSSL may not support ssl2
2016-11-14 12:02:55 -08:00
Aanand Prasad
c66c2d6fa5
Fix linting error
...
This seems to have been ignored by older versions of flake8, and fixed
in version 3.1.0 or 3.1.1.
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2016-11-14 18:20:13 +00:00
Tomas Tomecek
9a485b30ee
ssl,test: OpenSSL may not support ssl2
...
Fixes #1265
Signed-off-by: Tomas Tomecek <ttomecek@redhat.com>
2016-11-14 09:05:26 +01:00
Ben Firshman
3c7c231983
Fix broken unit test
...
Introduced by https://github.com/docker/docker-py/pull/1230
Signed-off-by: Ben Firshman <ben@firshman.co.uk>
2016-11-07 12:20:20 -08:00
Joffrey F
f745c8e7c5
Merge pull request #1230 from LabattFoodService/updateNode
...
enable setting of node labels #1225
2016-11-07 10:47:55 -08:00
Walker Lee
a3981f891d
Add docker network IPAM options parameter
...
Signed-off-by: Walker Lee <walkerlee.tw@gmail.com>
2016-10-27 00:17:05 +08:00
Joffrey F
cec3fe7c31
Update tests to avoid failures on Windows platforms
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-10-14 16:02:28 -07:00
Joffrey F
14634fb50a
Merge pull request #1256 from docker/format_env_unicode_bug
...
Do not break when calling format_environment with unicode values
2016-10-13 12:39:47 -07:00
Joffrey F
059f61bf5a
Do not break when calling format_environment with unicode values
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-10-12 17:52:43 -07:00
Joffrey F
05f1060824
Remove trailing slashes in result of utils.parse_host
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-10-12 16:06:43 -07:00
Ben Firshman
69e992ec48
Move requires_api_version to helpers
...
Because it's a helper, not a base thing. In preparation for
moving/deleting the unit test base classes.
Signed-off-by: Ben Firshman <ben@firshman.co.uk>
2016-10-03 11:58:08 +01:00
Joffrey F
49997d040b
Add support for isolation param in host config
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-09-29 16:34:36 -07:00
Nathan Shirlberg
6ef14932d0
enable setting of node labels #1225
...
Added update_node function to enable setting labels on nodes. This
exposes the Update a Node function from the Docker API and should
enable promoting/demoting manager nodes inside a swarm.
Signed-off-by: Nathan Shirlberg <nshirlberg@labattfood.com>
2016-09-27 11:26:26 -05:00
Joffrey F
1e939be5fb
Merge pull request #1210 from docker/identity-token-support
...
Add support for identity tokens in config file
2016-09-16 11:47:48 -07:00
Joffrey F
d731a4315c
Add support for identity tokens in config file.
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-09-15 14:28:09 -07:00
Ben Firshman
6220636536
Fix a few pep8 issues
...
autopep8 --in-place --recursive --experimental -aaa --ignore E309 .
Signed-off-by: Ben Firshman <ben@firshman.co.uk>
2016-09-14 16:54:54 +01:00
Ben Firshman
0cdf737625
Fix unit test which doesn't do anything
...
It also overrode the fake API inspect endpoint with a broken
response.
Signed-off-by: Ben Firshman <ben@firshman.co.uk>
2016-09-07 11:40:19 +02:00
Ben Firshman
3769c089e8
Fix licenses
...
* Complete main LICENSE
* Remove unnecessary licenses from individual files
Signed-off-by: Ben Firshman <ben@firshman.co.uk>
2016-09-05 17:48:09 +02:00
Joffrey F
6552076856
Add support for force disconnect
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-08-31 18:44:36 -07:00
Joffrey F
24bfb99e05
Merge pull request #1167 from docker/1075-from-env-version
...
Support version parameter in `Client.from_env`
2016-08-25 14:59:46 -07:00
Joffrey F
764d7b38c4
Support version parameter in `Client.from_env`
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-08-25 14:44:13 -07:00
Joffrey F
2ef02df2f0
Merge pull request #1168 from docker/aiden0z-master
...
Support pids_limit in HostConfig
2016-08-25 14:38:22 -07:00
fermayo
5bedd32a69
Fix creating containers with env vars with unicode characters
...
Signed-off-by: Fernando Mayo <fernando@docker.com>
2016-08-25 13:36:02 +02:00
Joffrey F
902c7a76cc
Docs and tests for pids_limit.
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-08-23 17:05:08 -07:00
Joffrey F
fb41965272
Merge pull request #1082 from masci/fix_stream_helper
...
Invoke self._result passing `json=True` when `decode=True`
2016-08-23 15:34:35 -07:00
Kay Yan
fc72ac66e9
support MemoryReservation and KernelMemory
...
Signed-off-by: Kay Yan <kay.yan@daocloud.io>
2016-08-23 15:32:06 -07:00
Joffrey F
797f1edc20
Merge branch 'master' of https://github.com/srikalyan/docker-py into srikalyan-master
2016-08-23 15:16:15 -07:00
Joffrey F
0e4314a872
Merge branch 'jp-cpushares' of https://github.com/joshpurvis/docker-py into joshpurvis-jp-cpushares
2016-08-23 15:12:30 -07:00
Joffrey F
0acdd19665
Merge pull request #1131 from Knetic/dnsopts
...
Implemented dns_opt support (from api 1.21)
2016-08-23 15:04:25 -07:00
Josh Purvis
7d147c8ca1
Move cpu_shares and cpuset_cpu to HostConfig when API >= 1.18
...
Signed-off-by: Josh Purvis <joshua.purvis@gmail.com>
2016-08-15 16:33:58 -04:00
Tomas Tomecek
08b284ab39
docker client consistency: don't quote ':/'
...
E.g.
docker client
`/v1.21/images/localhost:5000/busybox/push?tag=`
docker-py
`/v1.21/images/localhost%3A5000%2Fbusybox/push`
Signed-off-by: Tomas Tomecek <ttomecek@redhat.com>
2016-08-10 09:30:19 +02:00
George Lester
93b4b4134e
Implemented dns_opt support (from api 1.21)
...
Signed-off-by: George Lester <glester491@gmail.com>
2016-08-07 14:23:22 -07:00
Joffrey F
ae7cb4b99f
Avoid crashing in update_headers decorator when headers kwarg is None
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-08-02 17:25:50 -07:00
Jari Takkala
dec29e1c10
Add support for sysctl when creating container
...
Closes #1144
Signed-off-by: Jari Takkala <jtakkala@gmail.com>
2016-08-01 23:43:52 +01:00
Joffrey F
723d144db5
Add support for IPv6 docker host connections.
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-07-27 18:42:14 -07:00
Aanand Prasad
0e68b0a429
Default to npipe address on Windows
...
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2016-07-26 11:39:09 +01:00
Keerthan Reddy Mala
1294d3c410
Add unit tests
...
Signed-off-by: Keerthan Reddy Mala <kmala@deis.com>
2016-07-22 10:04:32 -06:00
Ben Firshman
bd73225e14
Set custom user agent on client
...
Signed-off-by: Ben Firshman <ben@firshman.co.uk>
2016-07-20 15:04:54 -07:00
Joffrey F
e64ba8f2b9
Mock read_from_socket method
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-07-13 17:08:17 -04:00
David Gageot
5464cf2bea
Add hijack hints for non-detached exec api calls
...
Signed-off-by: David Gageot <david@gageot.net>
2016-07-13 17:08:17 -04:00
Tomas Tomecek
8f8a3d0ed2
volumes,create: support adding labels
...
Fixes #1102
Signed-off-by: Tomas Tomecek <ttomecek@redhat.com>
2016-07-13 08:41:45 +02:00
Justin Michalicek
e8ea79dfdb
Change double underscore in test case names for _set_auth_headers
...
* Change test__set_auth_headers_* methods to test_set_auth_headers_*
Signed-off-by: Justin Michalicek <jmichalicek@gmail.com>
2016-07-12 10:06:34 -04:00
Justin Michalicek
f7807bdb52
Update build unit tests
...
* Test that the request from build when the client has
auth configs contains the correct X-Registry-Config header
* Test that BuildApiMixin._set_auth_headers() updates the passed
in headers dict with auth data from the client
* Test that BuildApiMixin._set_auth_headers() leaves headers dict intact
when there is no _auth_config on the client.
Signed-off-by: Justin Michalicek <jmichalicek@gmail.com>
2016-07-12 10:06:34 -04:00
Srikalyan Swayampakula
b5d3556bce
Added support for user namespace.
...
Signed-off-by: Srikalyan Swayampakula <srikalyansswayam@gmail.com>
2016-06-30 15:25:17 -07:00
Joffrey F
538a1db9dd
Merge pull request #1066 from yunzhu-li/blkio-control
...
Add support for Block IO constraints in HostConfig
2016-06-15 14:26:49 -07:00
Massimiliano Pippi
86d1b8fb83
invoke self._result with json=True if decode=True
...
Signed-off-by: Massimiliano Pippi <massi@datadoghq.com>
2016-06-07 10:32:02 -04:00
yunzhu-li
896d36ea1d
Add support for Block IO constraints in HostConfig
...
This adds support for Block IO constraint options:
- blkio-weight
- blkio-weight-device
- device-read-bps
- device-write-bps
- device-read-iops
- device-write-iops
Signed-off-by: yunzhu-li <contact@yunzhu.li>
2016-06-05 23:30:44 -04:00
Joffrey F
0176fa171f
Update parse_host and tests
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-06-02 18:21:29 -07:00
Thomas Grainger
e0b9cb2a8c
support Python 3.5
...
Signed-off-by: Thomas Grainger <tom.grainger@procensus.com>
2016-05-19 17:59:34 +01:00
Aanand Prasad
5ebf4b8ec7
Resolve path traversal in .dockerignore patterns
...
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2016-05-16 15:55:06 +01:00
Kevin Frommelt
2826dd51e7
Don't set socket timeout if it's already disabled when streaming
...
Signed-off-by: Kevin Frommelt <kevin.frommelt@gmail.com>
2016-05-10 10:23:14 -05:00