Commit Graph

365 Commits

Author SHA1 Message Date
shin- 26933543fe Added license header to .py files 2013-09-10 20:34:03 +02:00
shin- 99c9eadc82 Cleanup, externalized into modules, fixed auth 2013-09-10 20:31:03 +02:00
shin- dc3937faa8 Fixed several auth bugs 2013-09-10 02:21:33 +02:00
Deni Bertovic 49a3cb87b1 Merge branch 'master' of github.com:dotcloud/docker-py into issue-33
Conflicts:
	docker/client.py
2013-09-05 08:32:08 +02:00
Deni Bertovic f032ecfe47 Fixed #33 - make client commands more consistent 2013-09-04 15:53:37 +02:00
Joffrey F d47b45d860 Merge pull request #37 from aanand/set-attach-attributes
When creating a container, set Attach* attributes according to detach and stdin_open arguments
2013-09-03 19:29:38 -07:00
Aanand Prasad 0b26b696e1 Implement client.copy(), which works much like export() 2013-09-03 13:30:33 -04:00
Aanand Prasad 31a2b40d8d Implement top() 2013-09-03 13:30:32 -04:00
Aanand Prasad fea6f1c197 Remove redundant status code check from _result() 2013-09-03 13:27:35 -04:00
Aanand Prasad 5a2edc1806 Remove custom error code handling 2013-09-03 13:27:35 -04:00
Aanand Prasad ddee3a5380 Enable overriding of APIError explanation. Override explanation for missing image in run(). 2013-09-03 13:27:35 -04:00
Aanand Prasad f35cc69994 Call _raise_for_status every time we make a request 2013-09-03 13:27:35 -04:00
Aanand Prasad 6d728157d6 Refactor HTTP error reporting
- `APIError` class extends `HTTPError`
- Custom error string logic moved into `APIError.__init__()`
- Conveniences: `explanation`, `is_client_error()`, `is_server_error()`
- Strip trailing newline from explanation
2013-09-03 13:27:35 -04:00
Aanand Prasad da3fe9cdaa attach_socket() method for just getting the HTTP socket 2013-09-03 13:24:59 -04:00
Aanand Prasad fdcc4d9a09 Set AttachStd* attributes according to detach and stdin_open commands, analogously to the docker cli 2013-09-01 01:02:00 -04:00
Evan Hazlett ea087b7b15 added privileged container support 2013-08-30 09:35:09 -04:00
shin- 4d02aa2228 create_container now accepts dict objects for the environment parameter. Fixes #20 2013-08-27 02:22:40 +02:00
shin- 96e8e55655 Fix for #30 (Client#build tag param now works properly) 2013-08-27 01:53:33 +02:00
shin- 81b870f523 Merge branch 'master' of https://github.com/dotcloud/docker-py 2013-08-27 01:32:52 +02:00
shin- 75d6f84e93 remove_container now raises an exception when encountering an error 2013-08-27 01:22:06 +02:00
Ben Whaley 3f00c059d4 Add nocache build option 2013-08-14 16:48:54 -07:00
shin- 7380f3827f Merge branch 'master' of https://github.com/dotcloud/docker-py 2013-08-14 23:12:15 +02:00
shin- d0c54361d9 Use tempfiles instead of memfiles for build contexts 2013-08-14 23:11:53 +02:00
Raphaël De Giusti 579201bcf7 Fixed python26 shlex split of unicode strings.
Python 2.6.6 (r266:84292, Sep 11 2012, 08:34:23)
[GCC 4.4.6 20120305 (Red Hat 4.4.6-4)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import shlex
>>> cmd = u"/bin/bash echo 'Hello World'"
>>> shlex.split(cmd)
['/\x00\x00\x00b\x00\x00\x00i\x00\x00\x00n\x00\x00\x00/\x00\x00\x00b\x00\x00\x00a\x00\x00\x00s\x00\x00\x00h\x00\x00\x00',
'\x00\x00\x00e\x00\x00\x00c\x00\x00\x00h\x00\x00\x00o\x00\x00\x00',
'\x00\x00\x00\x00\x00\x00H\x00\x00\x00e\x00\x00\x00l\x00\x00\x00l\x00\x00\x00o\x00\x00\x00
\x00\x00\x00W\x00\x00\x00o\x00\x00\x00r\x00\x00\x00l\x00\x00\x00d\x00\x00\x00\x00\x00\x00']
>>> shlex.split(str(cmd))
['/bin/bash', 'echo', 'Hello World']
2013-08-14 08:27:42 +02:00
shin- c31ce82d2c Bumped to 0.1.4 2013-08-13 20:05:13 +02:00
Nick Stinemates 2c27d9bba7 made unix sockets the default configuration and usage for the client library to reflect the changes made in 0.5.2. this change uses the hook in the requests Sessions object to associate unix:// paths with a set of custom pools and connections. the goal was to patch with as much reuse and interface compatibility to make the changes seamless to the end-user and so as to not introduce regressions on existing functionality. 2013-08-13 17:35:03 +00:00
shin- 17a6994e43 Docker client now tries to load the auth config. This is necessary to use the push command if API version is >1.0 2013-08-06 19:57:20 +02:00
shin- 4f7872da87 Fixed tests 2013-07-25 20:18:38 +02:00
shin- a12432fba2 Added 'quiet' param to Client.build 2013-07-25 18:27:44 +02:00
Nick Stinemates 177409968f fix gh#21 - 0.5.0 portspec changes break client.port() resulting in KeyError 2013-07-19 22:53:38 +00:00
shin- c3a488f9c0 Removed tar contents printing in Client._tar 2013-07-17 17:29:54 +02:00
shin- 08698d69e2 Added version param in constructor to simplify use of different versions of the Docker API 2013-07-16 17:47:08 +02:00
shin- 1c618561f5 Clarify post_json method being internal (2) 2013-07-16 17:35:43 +02:00
shin- b252547b9c Clarify post_json method being internal 2013-07-16 17:34:48 +02:00
shin- 43b3b0996f Replaced build with build_context ; added support for in-memory dockerfiles 2013-07-15 18:57:09 +02:00
shin- 4a3350b398 Switching to server-side build system 2013-07-15 18:57:09 +02:00
Thatcher be9c964730 Fixed bug by which c.port('<id>', <port>) would fail because when port not a string
e.g. 
c.port('e087bc23f8d5', 80)

would fail

and 
c.port('e087bc23f8d5', '80') would work. I now inserted str() so it should always work.
2013-07-11 17:53:14 -03:00
Paulo Sousa e1c8a57c85 Added option to attach on containers and be verbose on build process 2013-07-11 16:03:45 -03:00
Enrico 2551105320 Merge branch 'upstream-master' into bind-mounts
Conflicts:
	tests/test.py
2013-07-05 16:23:37 -03:00
Enrico 835f350bd7 Added content-type header to the `post_json` method, some routes need it. 2013-07-05 15:45:58 -03:00
Enrico c2a145c2d8 Added ability to create binds when starting a container. 2013-07-05 15:25:52 -03:00
Sebastian Vetter 48ed4a1d2e Add python 3 support 2013-07-06 00:32:28 +10:00
shin- b7e1ac7069 Fixed logs command 2013-07-03 22:19:41 +02:00
shin- 5ca13da482 Maintain alphabetical order for API methods 2013-07-03 22:00:30 +02:00
shin- f6fce6f2fc Merge branch 'master' of git://github.com/trivio/docker-py into trivio-master 2013-07-03 21:57:53 +02:00
shin- 7a042e0c1a Formatting, implemented ADD in builder (remote only) 2013-07-03 21:52:11 +02:00
Scott Robertson b39d7b465e don't attach stdin 2013-07-03 08:04:05 -07:00
Scott Robertson b088fc5fe7 add docker.attach() 2013-07-02 20:16:36 -07:00
Kimbro Staken 763388eb3c Allow control over the logging done by BuilderClient 2013-06-29 02:24:24 -07:00
shin- a115b50ef5 use shlex.split when command for create_container is a plain string 2013-06-24 21:30:47 +02:00
Evan Hazlett 33b1af6334 added tag support for builder 2013-06-24 02:05:32 -04:00
shin- 3ffef6dd04 Merge branch 'master' of https://github.com/dotcloud/docker-py 2013-06-21 19:56:54 +02:00
shin- ada06bd56d Fixed quiet option in images() 2013-06-21 19:55:56 +02:00
Ken Cochrane 4f748a9d3f Merge pull request #5 from nickstenning/config-typo
Fix typo -- config is a dictionary
2013-06-21 06:12:45 -07:00
Nick Stenning 982087c4f9 Python 3 compatibility: relative imports
In Python 3, this kind of import doesn't work any more. Relative imports have to
be explicit, as in this commit.
2013-06-21 14:05:06 +01:00
Nick Stenning 0cbb9f61aa Fix typo -- config is a dictionary
`self.config` is a dictionary, not an object. References to `self.config.Cmd`
should be `self.config['Cmd']`.
2013-06-20 22:02:48 +01:00
shin- bfbf1eac54 Support multiple slashes in client.push 2013-06-18 06:30:29 -07:00
shin- 9578ee3df4 Fixed 'cmd' command in builder. container config now accepts command as a string or a list and converts accordingly. 2013-06-12 08:39:41 -07:00
shin- f69c179575 Improved error reporting (thanks @johncosta) and don't encapsulate ports in a list in container_config 2013-06-12 07:38:00 -07:00
Joffrey F 7a41f4d227 Merge pull request #2 from cove/master
Minor type fixes that caused the docker server to return 500s
2013-06-06 11:43:39 -07:00
shin- b8621c7871 Trim whitespace in dockerfile command args 2013-06-06 11:38:48 -07:00
shin- a444397b9e Fixed a bug where images and containers would be removed after a successful build 2013-06-06 09:05:58 -07:00
Cove Schneider bcd3a64827 minor json fixes that caused the docker server to return 500s 2013-05-27 09:31:41 -07:00
shin- 5d6271417c Fixed Client.tag 2013-05-23 11:54:31 -07:00
shin- 5daf7bcc99 Added .gitignore, proper packaging, updated setup.py, cleaned up commented code 2013-05-23 06:35:51 -07:00