Commit Graph

3158 Commits

Author SHA1 Message Date
Joffrey F 115f39e96e Merge pull request #1316 from bfirsh/add-example-for-tag
Add example for tag()
2016-11-28 13:14:02 -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
Stepan Stipl 7ef48c3769 Allow custom PID mode for the container
Docker added support for sharing PID namespaces with other containers
since version 1.12 (see https://github.com/docker/docker/pull/22481).

Signed-off-by: Stepan Stipl <stepan@stipl.net>
2016-11-28 11:42:00 -08: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
Ben Firshman 29215a0ad9
Add example for tag()
Carrying #1120. Thanks @Faylixe!

Signed-off-by: Ben Firshman <ben@firshman.co.uk>
2016-11-28 19:38:29 +00:00
Joffrey F f051f7e90a Merge pull request #1314 from bfirsh/specify-encoding-for-readme
Specify encoding when loading readme
2016-11-28 11:33:43 -08:00
Michael Merickel dbd704e68d do not assume that read will consume the number of bytes requested
The issue is that ``os.read`` does not always read the expected number of
bytes, and thus we are moving to the next frame too early causing drift
in the byte stream. When the reading drifts, it starts reading garbage
as the next frame size. The some examples of frame sizes were
4032897957 bytes, etc. Values this large were causing the exceptions
from ``os.read``.

fixes #1211

Signed-off-by: Michael Merickel <michael@merickel.org>
2016-11-28 13:31:12 -06:00
Joffrey F f36c28926c Merge pull request #1305 from bfirsh/update-setup-py
Update setup.py and things
2016-11-28 11:29:42 -08:00
Ben Firshman 3518c9f631 Merge pull request #822 from docker/no_start_config
Remove support for host_config in Client.start
2016-11-28 19:05:09 +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
Ben Firshman fc9f7e2b2f
Bump version to 2.0.0-dev
Signed-off-by: Ben Firshman <ben@firshman.co.uk>
2016-11-28 15:11:01 +00:00
Ben Firshman 6d770a65d7
Use find_packages in setup.py
It was missing docker.models, and this will fix it forever more.

Signed-off-by: Ben Firshman <ben@firshman.co.uk>
2016-11-28 15:11:01 +00:00
Ben Firshman 04e9437986
Update setup.py details
Move from "docker-py" package to "docker".

Signed-off-by: Ben Firshman <ben@firshman.co.uk>
2016-11-28 15:11:01 +00:00
Ben Firshman e04c4ad83f
Update readme to say "Docker Engine API"
It's not the Docker API.

Signed-off-by: Ben Firshman <ben@firshman.co.uk>
2016-11-28 15:10:58 +00:00
Aanand Prasad 4c8c761bc1 Merge pull request #1307 from docker/bfirsh_maintainer
Add Ben to MAINTAINERS
2016-11-28 14:45:34 +00:00
Ben Firshman a658e14e8b
Specify encoding when loading readme
Loading readme fails when system locale is not utf-8.

Potentially replaces #1313

Signed-off-by: Ben Firshman <ben@firshman.co.uk>
2016-11-28 14:38:38 +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
Brandon Bodnar e2eb4a3158 Prevent traversing excluded directories with no possible dockerignore exceptions
Fixes an issue where all files in a rather large excluded folder are traversed and examined when creating the build context for potential exception to the exclusion, even though the exclusion rule is for a completely unrelated folder.

Signed-off-by: Brandon Bodnar <bodnarbm@gmail.com>
2016-11-26 21:17:18 -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
Joffrey F 037ead974b Add Ben to MAINTAINERS
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-11-23 11:37:33 -08:00
Joffrey F c66c7f8b0a Merge pull request #1306 from bfirsh/mmmmmm-vector-graphics
Use SVG for build status badge
2016-11-23 11:30:20 -08:00
Joffrey F 30f3a0299e Merge pull request #1304 from bfirsh/fix-documentation-link
Fix documentation link in readme
2016-11-23 11:28:52 -08:00
Ben Firshman af67add683
Add warning about development version to readme
Signed-off-by: Ben Firshman <ben@firshman.co.uk>
2016-11-23 18:07:33 +00:00
Ben Firshman aafcf5a7fe
Change package in readme back to docker-py
Signed-off-by: Ben Firshman <ben@firshman.co.uk>
2016-11-23 18:02:23 +00:00
Ben Firshman afea2ca269
Use SVG for build status badge
Signed-off-by: Ben Firshman <ben@firshman.co.uk>
2016-11-23 15:21:56 +00:00
Ben Firshman c96848eb9c
Fix documentation link in readme
The rest of the readme is wrong until we release 2.0, but at
least the documentation points to the right place.

Closes #1302

Signed-off-by: Ben Firshman <ben@firshman.co.uk>
2016-11-23 14:47:46 +00:00
Joffrey F 8478491cf8 Merge pull request #1186 from bfirsh/two-point-oh
A new user-focused API
2016-11-22 16:41:52 -08:00
Joffrey F 0591477642 Merge pull request #1301 from biniambekele/master
Fix ContainerApiMixin.copy with dict container arg
2016-11-22 16:29:51 -08:00
biniambekele a38644fc0e Fix ContainerApiMixin.copy with dict container arg
Signed-off-by: biniambekele <biniambekele@users.noreply.github.com>
2016-11-22 15:17:45 -05: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 c7a3aa7e44
Add new Sphinx documentation
Initial work thanks to @aanand.

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 f32c0c1709
Add docstrings to low-level API
Signed-off-by: Ben Firshman <ben@firshman.co.uk>
2016-11-22 17:03:04 +00:00
Ben Firshman ed959f2144
Move contributing docs to CONTRIBUTING.md
CONTRIBUTING.md is the place that GitHub expects it to be.

Signed-off-by: Ben Firshman <ben@firshman.co.uk>
2016-11-22 17:03:04 +00:00
Ben Firshman d98a879016
Add random_name test helper
Signed-off-by: Ben Firshman <ben@firshman.co.uk>
2016-11-22 17:03:04 +00:00
Ben Firshman 6334312e47
Split out base integration test for APIClient
So the cleanup stuff can be reused for model tests.

Signed-off-by: Ben Firshman <ben@firshman.co.uk>
2016-11-22 17:03:04 +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 dac7174ff2
Make ping return bool instead of string
Signed-off-by: Ben Firshman <ben@firshman.co.uk>
2016-11-22 17:03:03 +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 c7903f084e
Remove AutoVersionClient
Just do Client(version='auto').

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 b49cacced0
Make docker.utils.ports a single file
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
Ben Firshman 81dfc475b3
Drop support for API versions <1.24
Implemented as just a warning. Actual removal of code will follow
sometime in the future.

Signed-off-by: Ben Firshman <ben@firshman.co.uk>
2016-11-22 17:03:01 +00:00
Joffrey F 7c7688cba9 Merge pull request #1266 from bfirsh/add-rm-to-makefile-docker-run
Add --rm to docker run in Makefile
2016-11-21 11:30:02 -08:00