Commit Graph

155 Commits

Author SHA1 Message Date
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