Commit Graph

979 Commits

Author SHA1 Message Date
Joffrey F 884261e241 Fix socket tests for TLS-enabled tests
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-03-15 16:37:58 -07:00
Joffrey F 90c0dbe5f8 Add test for container list with sparse=True
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-03-14 16:53:56 -07:00
Joffrey F 33f1ca9a48 Use same split rules for Dockerfile as other include/exclude patterns
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-03-14 14:11:42 -07:00
Joffrey F 13609359ac Improve dockerignore comment test
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-03-05 11:49:43 -08:00
Wanzhi Du 74586cdd4c Fix flake8 case
Signed-off-by: Wanzhi Du <wanzhi09@gmail.com>
2018-03-05 19:26:56 +08:00
Wanzhi Du 7a28ff3510 Ignore comment line from the .dockerignore file
This fixed the bug that test comment line in .dockerignore file as ignore rule
bug.

Add test for "# comment" patterns in .dockerignore.

Signed-off-by: Wanzhi Du <wanzhi09@gmail.com>
2018-03-05 18:10:09 +08:00
Joffrey F 9b8e022fa1
Merge pull request #1928 from mnottale/fix-spurious-resolution-macos-slowdown
Workaround requests resolving our unix socket URL on macosx.
2018-02-27 08:58:59 -08:00
Joffrey F fe966764ef
Merge pull request #1927 from mefyl/master
Add test for "/.." patterns in .dockerignore.
2018-02-26 10:53:41 -08:00
Matthieu Nottale 15c26e7057 Workaround requests resolving our unix socket URL on macosx.
Signed-off-by: Matthieu Nottale <matthieu.nottale@docker.com>
2018-02-26 14:47:26 +01:00
mefyl 4295919103
Add test for "/.." patterns in .dockerignore.
Signed-off-by: mefyl <quentin.hocquet@docker.com>
2018-02-26 12:59:46 +01:00
Yong Tang ab1f90a379 Cleanup containers during the tests
This fix tries to clean up the containers during the tests
so that no pre-existing volumes left in docker integration tests.

This fix adds `-v` when removing containers, and makes sure
containers launched in non-daemon mode are removed.

This fix is realted to moby PR 36292

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2018-02-23 15:22:42 +00:00
Joffrey F 9a4cc53c52 Merge branch 'release' into 3.1.0-release
Signed-off-by: Joffrey F <joffrey@docker.com>

Conflicts:
	docker/version.py
	tests/unit/api_test.py
	tests/unit/utils_test.py
2018-02-22 13:36:15 -08:00
Joffrey F cc6e1b1249
Merge pull request #1914 from mefyl/master
Improve .dockerignore compliance
2018-02-22 13:35:41 -08:00
Joffrey F ad5f49b690
Merge pull request #1918 from rycus86/service-restart-method
Shorthand method for service.restart()
2018-02-21 12:05:10 -08:00
Viktor Adam e54e8f4199 Shorthand method for service.force_update()
Signed-off-by: Viktor Adam <rycus86@gmail.com>
2018-02-21 19:55:17 +00:00
mefyl bb3ad64060
Fix .dockerignore: accept wildcard in inclusion pattern, honor last line precedence.
Signed-off-by: mefyl <quentin.hocquet@docker.com>
2018-02-21 17:05:26 +01:00
mefyl c8f5a5ad40
Fix dockerignore handling of absolute path exceptions.
Signed-off-by: mefyl <quentin.hocquet@docker.com>
2018-02-21 17:05:26 +01:00
Joffrey F 8fd9d3c99e GenericResources was introduced in 1.32
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-02-20 17:11:27 -08:00
Joffrey F 9b6b306e17 Code cleanup and version guards
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-02-20 16:25:17 -08:00
William Myers 820de848fa Add support for generic resources to docker.types.Resources
- Add support for dict and list generic_resources parameter
- Add generic_resources integration test

Signed-off-by: William Myers <mwilliammyers@gmail.com>
2018-02-20 16:25:17 -08:00
Joffrey F cc455d7fd5 Fix DockerClient pull bug when pulling image by digest
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-02-20 14:51:49 -08:00
mefyl 181c1c8eb9 Revert "Correctly support absolute paths in .dockerignore"
This reverts commit 34d50483e2.

Signed-off-by: mefyl <quentin.hocquet@docker.com>
2018-02-19 13:37:35 +01:00
Joffrey F 4c708f568c Fix test_login flakes
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-02-14 16:22:33 -08:00
Joffrey F 08803743c5
Merge pull request #1906 from docker/1352-data_stream_control
Add chunk_size parameter to data downloading methods
2018-02-14 16:22:02 -08:00
Joffrey F 581ccc9f7e Add chunk_size parameter to data downloading methods (export, get_archive, save)
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-02-14 16:07:19 -08:00
Joffrey F dbcf04388a
Merge pull request #1908 from docker/1861-credstore_login
Fix authconfig resolution when credStore is used combined with login()
2018-02-14 16:04:47 -08:00
Yong Tang cbbc37ac7b Clean up created volume from test_run_with_named_volume
This fix adds the volume id to the list so that it could be
cleaned up on test teardown.

The issue was originally from https://github.com/moby/moby/pull/36292
where an additional `somevolume` pre-exists in tests.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2018-02-14 13:01:16 +00:00
Joffrey F 3498b63fb0 Fix authconfig resolution when credStore is used combined with login()
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-02-13 18:55:56 -08:00
Joffrey F 48e45afe88 Add support for device_cgroup_rules parameter in host config
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-02-13 17:05:16 -08:00
Joffrey F 34d50483e2 Correctly support absolute paths in .dockerignore
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-02-12 14:59:41 -08:00
Joffrey F 6de7bab22f Rewrite access check in create_archive with EAFP
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-02-05 13:38:32 -08:00
Joffrey F 539b321bd1 Add login data to the right subdict in auth_configs
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-02-05 13:38:19 -08:00
Joffrey F a60011ca3a Add workaround for bpo-32713
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-02-05 13:38:03 -08:00
Joffrey F 7c19772eb6
Merge pull request #1901 from docker/1899-create_archive_fix
Rewrite access check in create_archive with EAFP
2018-02-05 13:37:01 -08:00
Joffrey F 58639aecfa Rewrite access check in create_archive with EAFP
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-02-05 13:11:19 -08:00
Joffrey F 855b71eabe
Merge pull request #1896 from docker/1895-login-auths
Add login data to the right subdict in auth_configs
2018-02-02 10:29:33 -08:00
Joffrey F 04bf470f6e Add workaround for bpo-32713
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-02-01 16:51:36 -08:00
Joffrey F 83d185d695 Add login data to the right subdict in auth_configs
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-02-01 16:02:09 -08:00
Joffrey F 7fabcdaa4c Update wait to always return a dict
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-01-31 16:52:26 -08:00
Joffrey F ea44212969
Merge pull request #1888 from docker/1884-create_volumes_win32
Correctly parse volumes with Windows paths
2018-01-31 15:25:49 -08:00
Joffrey F 209ae2423d Correctly parse volumes with Windows paths
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-01-31 15:12:15 -08:00
Joffrey F df8422d079 Refuse API version < 1.21 ; Remove associated code paths
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-01-31 14:42:01 -08:00
Joffrey F 5347c168d0 Add support for publish mode for endpointspec ports
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-01-31 12:42:11 -08:00
Joffrey F ccbde11c8d Improve separation between auth_configs and general_configs
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-01-30 18:42:38 -08:00
Joffrey F e304f91b46 Update detach tests to work with AF_INET as well
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-01-30 17:16:23 -08:00
Fumiaki MATSUSHIMA dd858648a0 Use config.json for detachKeys
Signed-off-by: Fumiaki Matsushima <mtsmfm@gmail.com>
2018-01-30 17:16:23 -08:00
Joffrey F 17aa31456d Properly support pulling all tags in DockerClient.images.pull
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-01-30 16:47:04 -08:00
Joffrey F a05922e949
Merge pull request #1881 from docker/pytest-asserts
Use pytest asserts
2018-01-30 16:29:07 -08:00
Joffrey F 3422211309 Use pytest asserts
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-01-30 14:26:24 -08:00
Joffrey F 4e34300379 Do not break when archiving broken symlinks
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-01-29 18:27:12 -08:00
Joffrey F 5728eebf79
Merge pull request #1874 from docker/1774-export-methods
Update save / export methods to return data generators
2018-01-29 16:19:45 -08:00
Joffrey F 388f291b13 Update save / export methods to return data generators
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-01-26 16:23:55 -08:00
Joffrey F 631cc3c121 ImageCollection.build now also returns build logs along with the built image reference
BuildError.build_logs has a copy of the logs generator

Signed-off-by: Joffrey F <joffrey@docker.com>
2018-01-26 15:59:46 -08:00
Joffrey F deb8222d69
Merge pull request #1873 from docker/hongbin-image-load
Return Image objects in ImageCollection.load
2018-01-26 14:45:09 -08:00
Joffrey F 8b5a52ae0c Error handling in ImageCollection.load
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-01-26 14:34:20 -08:00
Joffrey F 6e6eaece81 Return tuple instead of dict in exec_run
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-01-26 14:21:23 -08:00
Joffrey F b0cc4b5520 Merge branch 'add_exit_code_to_exec_run' of https://github.com/hnq90/docker-py into hnq90-add_exit_code_to_exec_run 2018-01-26 14:13:15 -08:00
Joffrey F abd60aedc7 Bump default API version to 1.35
Add ContainerSpec.isolation support
Add until support in logs
Add condition support in wait
Add workdir support in exec_create

Signed-off-by: Joffrey F <joffrey@docker.com>
2018-01-26 13:56:01 -08:00
Joffrey F a15a1d2fdd
Merge pull request #1856 from docker/1855-platform-option
Add support for experimental platform flag in build and pull
2018-01-24 18:12:50 -08:00
Joffrey F 4590e2a816
Merge pull request #1846 from feliperuhland/issue-1734-scale-method
Added scale method to the Service model.
2018-01-24 18:08:35 -08:00
Joffrey F ccd79323da Shift test matrix forward
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-01-24 11:39:43 -08:00
Joffrey F f95b958429 Add support for experimental platform flag in build and pull
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-01-23 16:59:09 -08:00
Viktor Adam e75a03fd6d Fix regression on API < 1.25
Signed-off-by: Viktor Adam <rycus86@gmail.com>
2018-01-12 22:18:53 +00:00
Joffrey F bf06a361e2 Ignore dockerignore lines that contain only whitespace
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-01-03 12:16:21 -08:00
Felipe Ruhland 663c6089e9 Fix test to make sure the initial mode is replicated
Signed-off-by: Felipe Ruhland <felipe.ruhland@gmail.com>
2018-01-03 00:21:56 -02:00
Felipe Ruhland 0e0a852680 Ensure that global containers are not scaled
Signed-off-by: Felipe Ruhland <felipe.ruhland@gmail.com>
2017-12-26 18:30:28 -02:00
Felipe Ruhland edb9e3c2ae Added scale method to the Service model.
Signed-off-by: Felipe Ruhland <felipe.ruhland@gmail.com>
2017-12-21 23:13:18 -02:00
Joffrey F 2250fa2ebd Don't attempt to retrieve container's stderr if `auto_remove` was set
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-12-19 13:50:32 -08:00
Joffrey F ac68a36a89
Merge pull request #1727 from mbelang/join-swarn-default-listen-address
Add join_swarm default listen address
2017-12-18 17:16:41 -08:00
Joffrey F 5736436966
Merge pull request #1828 from pkit/fix_error_from_httpex
fixes create_api_error_from_http_exception()
2017-12-18 14:26:47 -08:00
Constantine Peresypkin b20f800db6 fixes create_api_error_from_http_exception()
`create_api_error_from_http_exception()` is never tested in the original code
and will fail miserably when fed with empty `HTTPError` object
see fixes in requests for this behaviour: https://github.com/requests/requests/pull/3179

Signed-off-by: Constantine Peresypkin <pconstantine@gmail.com>
2017-12-18 17:15:48 +02:00
Joffrey F 6b8dfe4249 Retrieve container logs before container exits / is removed
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-12-14 16:53:44 -08:00
Joffrey F 8cfd4cb39f
Merge pull request #1807 from rycus86/update_service_from_prev_spec
Update service from prev spec
2017-12-14 12:44:36 -08:00
Joffrey F 644a82542b
Merge pull request #1834 from mhank/1823-support-update-order
Add support for order property when updating a service
2017-12-14 12:40:20 -08:00
Viktor Adam a66c89247a Renaming new argument
Signed-off-by: Viktor Adam <rycus86@gmail.com>
2017-12-14 09:55:36 +00:00
Joffrey F 20b5b58bb0
Merge pull request #1835 from docker/1758-url-quote-path
Fix URL-quoting for resource names containing spaces
2017-12-13 19:09:13 -08:00
Joffrey F 445cb18723 Add integration test for CPU realtime options
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-12-13 19:06:29 -08:00
Joffrey F d7bc8ac2b8 Merge branch 'master' of https://github.com/tz70s/docker-py into tz70s-master
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-12-13 18:50:07 -08:00
Joffrey F 7db76737ca Fix URL-quoting for resource names containing spaces
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-12-13 18:32:59 -08:00
Joffrey F aad0c76002
Merge pull request #1812 from rycus86/greedy_network_list
Fetch network details with network lists greedily
2017-12-13 16:33:06 -08:00
Michael Hankin 61bc8bea7f Add support for order property when updating a service
Signed-off-by: Michael Hankin <mjhankin1@gmail.com>
2017-12-12 15:49:07 -06:00
Michael Hankin 0134939c2c Change format in which hosts are being stored for Swarm services
Signed-off-by: Michael Hankin <mhank@users.noreply.github.com>
2017-12-05 21:19:37 -06:00
Michael Hankin 8d770b012d Change format of extra hosts
Signed-off-by: Michael Hankin <mjhankin1@gmail.com>
2017-12-03 14:54:28 -06:00
Viktor Adam 36ed843e2b Only allow greedy queries on the model
Signed-off-by: Viktor Adam <rycus86@gmail.com>
2017-11-21 21:59:11 +00:00
Joffrey F 58c02ca963
Merge pull request #1798 from docker/unlock_swarm_support
Unlock swarm support
2017-11-20 16:58:17 -08:00
Viktor Adam 2878900a71 Fixing integration tests
Signed-off-by: Viktor Adam <rycus86@gmail.com>
2017-11-19 21:03:07 +00:00
Viktor Adam 7829b728a4 Fetch network details with network lists greedily
Signed-off-by: Viktor Adam <rycus86@gmail.com>
2017-11-16 23:15:31 +00:00
Viktor Adam 828b865bd7 Fix resetting ContainerSpec properties to None
Signed-off-by: Viktor Adam <rycus86@gmail.com>
2017-11-15 18:30:05 +00:00
Viktor Adam c78e73bf7a Attempting to make service update tests less flaky
Signed-off-by: Viktor Adam <rycus86@gmail.com>
2017-11-15 08:17:16 +00:00
Viktor Adam b2d08e64bc Service model update changes
Signed-off-by: Viktor Adam <rycus86@gmail.com>
2017-11-14 23:32:19 +00:00
Viktor Adam 6e5eb2eba7 Update service using previous spec
Signed-off-by: Viktor Adam <rycus86@gmail.com>
2017-11-14 21:10:23 +00:00
Sebastiaan van Stijn e6cc3c1540
Remove test_update_swarm_name
Docker currently only supports the "default" cluster
in Swarm-mode, and an upcoming SwarmKit release
will produce an error if the name of the cluster
is updated, causing the test to fail.

Given that renaming the cluster is not supported,
this patch removes the test

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-11-14 02:47:49 +01:00
HuyNQ 436306f09d
Add exit code to exec_run
Signed-off-by: HuyNQ <huy@huynq.net>
2017-11-13 14:11:21 +07:00
Joffrey F 3bd053a4b7 Add unlock methods to Swarm model
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-11-07 15:44:54 -08:00
Joffrey F aa3c4f026d Add unlock_swarm and get_unlock_key to APIClient
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-11-07 15:19:07 -08:00
Joffrey F 65ba043d15 Update test engine versions in Jenkinsfile
Signed-off-by: Joffrey F <joffrey@docker.com>

Conflicts:
	Jenkinsfile
2017-11-07 15:18:26 -08:00
Joffrey F af0071403c Add support for insert_defaults in inspect_service
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-11-07 15:18:26 -08:00
Joffrey F ecca6e0740 Update SwarmSpec to include new parameters
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-11-07 15:18:26 -08:00
Joffrey F a0f6758c76 Add support for scope filter in inspect_network
Fix missing scope implementation in create_network

Signed-off-by: Joffrey F <joffrey@docker.com>
2017-11-07 15:18:26 -08:00
Joffrey F 6e1f9333d3 Oops
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-11-07 15:18:26 -08:00
Joffrey F 9756a4ec4c Fix build tests to not rely on internet connectivity
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-11-07 15:18:26 -08:00
Alessandro Baldo 80985cb5b2 Improve docs for service list filters
- add "label" and "mode" to the list of available filter keys in the high-level service API
- add "label" and "mode" to the list of available filter keys in the low-level service API
- add integration tests

Signed-off-by: Alessandro Baldo <git@baldoalessandro.net>
2017-11-07 15:18:26 -08:00
Joffrey F 2cb78062b1 More ContainerSpec tests
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-11-07 15:18:26 -08:00
Joffrey F b1301637cf Add support for configs management
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-11-07 15:18:26 -08:00
Joffrey F 53582a9cf5 Add support for extra_hosts option in build
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-11-07 15:18:26 -08:00
Joffrey F 5d1b652246 Add support for mounts in HostConfig
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-11-07 15:18:26 -08:00
Joffrey F f94fae3aa8 Remove superfluous version validation
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-11-07 15:18:26 -08:00
Steve Clark 1d77ef9e53 Adding swarm id_attribute to match docker output
Swarm id is returned in a attribute with the key ID. The swarm model was using the default behaviour and looking for Id.
Signed-off-by: Steve Clark <steve@cobe.io>
2017-11-07 15:18:26 -08:00
Joffrey F 7107e265b1 Do not interrupt streaming when encountering 0-length frames
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-11-07 15:18:26 -08:00
Joffrey F 303b303855 Use unambiguous advertise-addr when initializing a swarm
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-11-07 15:18:26 -08:00
Joffrey F 1a4b181344 Add support for insert_defaults in inspect_service
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-11-06 16:30:02 -08:00
Joffrey F 11a260225c Update SwarmSpec to include new parameters
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-11-03 16:01:33 -07:00
Joffrey F 1ce93ac6e7 Add support for scope filter in inspect_network
Fix missing scope implementation in create_network

Signed-off-by: Joffrey F <joffrey@docker.com>
2017-11-02 16:10:43 -07:00
Joffrey F ca7a6132a4 Oops
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-11-02 14:10:13 -07:00
Joffrey F d5094a8126 Fix build tests to not rely on internet connectivity
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-11-02 14:06:05 -07:00
Alessandro Baldo 76b138a0a1 Improve docs for service list filters
- add "label" and "mode" to the list of available filter keys in the high-level service API
- add "label" and "mode" to the list of available filter keys in the low-level service API
- add integration tests

Signed-off-by: Alessandro Baldo <git@baldoalessandro.net>
2017-11-01 15:18:05 -07:00
Joffrey F bb148380e1 More ContainerSpec tests
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-10-26 23:06:09 -07:00
Joffrey F 856414bf85 Add support for configs management
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-10-26 23:06:09 -07:00
Joffrey F 378bd76377 Update test engine versions in Jenkinsfile
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-10-25 17:05:09 -07:00
Joffrey F 93f2ab1530 Add support for extra_hosts option in build
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-10-25 15:09:39 -07:00
Joffrey F 5552deed86 Add support for mounts in HostConfig
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-10-24 18:59:01 -07:00
Joffrey F ec9356d3a0 Remove superfluous version validation
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-10-02 12:50:04 -07:00
Steve Clark ca435af52e Adding swarm id_attribute to match docker output
Swarm id is returned in a attribute with the key ID. The swarm model was using the default behaviour and looking for Id.
Signed-off-by: Steve Clark <steve@cobe.io>
2017-09-21 22:40:10 -07:00
Joffrey F 37fbc8b4fd Do not interrupt streaming when encountering 0-length frames
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-08-31 16:41:15 -07:00
Joffrey F 3c9c8b181c Use unambiguous advertise-addr when initializing a swarm
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-08-31 13:17:12 -07:00
Maxime Belanger 7fa2cb7be3 Add join_swarm default listen address
Since the docker CLI adds a default listen address (0.0.0.0:2377)
when joining a node to the swarm, the docker-py api will support
the same behavior to easy configuration.

Signed-off-by: Maxime Belanger <maxime.b.belanger@gmail.com>
2017-08-29 08:38:16 -04:00
Joffrey F 0c2b4e4d3a Always send attach request as streaming
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-08-22 17:00:11 -07:00
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
Joffrey F 89195146ad Always send attach request as streaming
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-08-21 15:56:19 -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
Gabriel Féron a6065df64d Add support for the `squash` flag when building
Also added a test that compares the number of layers in the default mode, and with the new flag

Signed-off-by: Gabriel Féron <feron.gabriel@gmail.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 b4802ea126 Handle untyped ContainerSpec dict in _check_api_features
Signed-off-by: Joffrey F <joffrey@docker.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
Cecile Tonglet 9e793806ff Return the result of the API when using remove_image and load_image
Those calls return result that can be used by the developers.

Signed-off-by: Cecile Tonglet <cecile.tonglet@gmail.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
Gabriel Féron 76eb0298c6 Add support for the `squash` flag when building
Also added a test that compares the number of layers in the default mode, and with the new flag

Signed-off-by: Gabriel Féron <feron.gabriel@gmail.com>
2017-08-15 18:09:39 -07:00
Joffrey F fe2e120705 Merge branch 'master' of github.com:docker/docker-py 2017-08-15 17:42:51 -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 18acd569a1 Handle untyped ContainerSpec dict in _check_api_features
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-08-15 17:22:25 -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
Cecile Tonglet 56dc7db069 Return the result of the API when using remove_image and load_image
Those calls return result that can be used by the developers.

Signed-off-by: Cecile Tonglet <cecile.tonglet@gmail.com>
2017-08-15 14:43:32 -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