Maxime Petazzoni
a102b189c6
Fix events() streaming by using _stream_helper()
...
Signed-off-by: Maxime Petazzoni <max@signalfuse.com>
2014-02-21 09:26:07 -08:00
Maxime Petazzoni
45cde4a034
Fix build() streaming and stream methods cleanup
...
Signed-off-by: Maxime Petazzoni <max@signalfuse.com>
2014-02-21 09:26:07 -08:00
Maxime Petazzoni
af1bb34d98
Clarify port bindings documentation for non-TCP port bindings
...
Signed-off-by: Maxime Petazzoni <max@signalfuse.com>
2014-02-18 14:39:04 -08:00
shin-
82f4c271ea
Updated integration tests
2014-02-18 19:58:50 +01:00
Joffrey F
7a39cda22a
Merge pull request #165 from stpierre/fix-http-error
...
Fix APIError for requests 1.1
2014-02-10 16:20:19 +01:00
Chris St. Pierre
cfbd41ca56
Fix APIError for requests 1.1
...
requests 1.1, which is what's available on CentOS 6, doesn't support
passing the response code as a keyword argument. It can be set after
the fact on both requests 1.1 and 1.2.
Docker-DCO-1.1-Signed-off-by: Chris St. Pierre <chris.a.st.pierre@gmail.com> (github: stpierre)
2014-02-10 09:52:51 -05:00
Joffrey F
4b090441bc
Merge pull request #161 from mpetazzoni/api-1.8
...
Support remote API v1.8 (and make it the default)
2014-02-06 17:25:47 +01:00
Maxime Petazzoni
64f4ba90ff
Support remote API v1.8 (and make it the default)
...
Signed-off-by: Maxime Petazzoni <max@signalfuse.com>
2014-02-05 15:25:49 -08:00
Maxime Petazzoni
417d691268
Merge pull request #158 from a-ba/master
...
Fixed malformatted request when using empty list in create_container()
2014-02-05 13:29:46 -08:00
Anthony Baire
f7cef8a3e2
Fixed malformatted request when using empty list in create_container()
...
create_container() sends a malformatted request when volumes==[] or
ports==[], causing error 500 "create: ExportEnv json: cannot unmarshal
array into Go value of type map"
The empty lists must be converted into a dict (or removed)
2014-02-04 11:35:06 +01:00
Joffrey F
548b1e7f6c
Merge pull request #156 from dmiyakawa/master
...
Allow copy() to accept dictionary like diff()
2014-01-31 09:40:23 -08:00
Joffrey F
789c22b933
Merge pull request #155 from bfirsh/fix-concat-string-with-bytes
...
Fix _stream_result concatenating bytes with str
2014-01-31 09:39:37 -08:00
Joffrey F
c00618d336
Merge pull request #157 from ticosax/ping-fixes
...
Ping fixes
2014-01-31 09:38:46 -08:00
Nicolas Delaby
51ead88e2d
A ping should be successful if status_code is less than 400
2014-01-31 16:12:01 +01:00
Nicolas Delaby
0903ea3dd8
replace status with status_code as defined by requests API
...
Move this statement in `else` clause to make sure the try except block doesn't catch
coding errors.
2014-01-31 16:10:10 +01:00
Daisuke Miyakawa
334ac12661
Allow copy() to accept dictionary like diff()
...
Client.diff() silently convert container as a dictionary
to container['Id'] while Client.copy() does not.
This change makes copy() do the same job.
2014-01-31 12:42:57 +09:00
Ben Firshman
b97e6ea043
Fix _stream_result concatenating bytes with str
...
Without this option, requests returns lines as bytes on Python 3
which can't be concatenated with the str '\n' in the yield.
2014-01-28 15:01:39 +00:00
Maxime Petazzoni
99ce1f7263
Merge pull request #154 from ibuildthecloud/fix-post-http-unix-merge-tests
...
Fix unit tests broken by PR #151
2014-01-27 10:29:07 -08:00
Darren Shepherd
8448d0217b
Fix unit tests broken by PR #151
...
Updates newer unit tests to use the http+unix scheme.
2014-01-27 11:25:32 -07:00
Joffrey F
38f3d08114
Merge pull request #151 from ibuildthecloud/http-unix-scheme
...
Support requests >=2.1.0
2014-01-27 09:49:20 -08:00
Joffrey F
38a5967bfd
Merge pull request #145 from aanand/set-stdinonce
...
If attaching to stdin, set StdinOnce, as per the docker CLI.
2014-01-27 09:43:28 -08:00
Joffrey F
7f826e7e93
Merge pull request #153 from bfirsh/links-as-tuples
...
Allow links to specified as (name, alias) tuples
2014-01-27 09:42:23 -08:00
Darren Shepherd
31f48d718d
Update to requests==2.2.1
2014-01-27 09:09:16 -07:00
Ben Firshman
22f147569b
Allow links to specified as (name, alias) tuples
2014-01-27 15:21:44 +00:00
Darren Shepherd
cf946ff27b
flake8 fixes
...
Additionally this change should make moving to /v1.8 slightly less painful
2014-01-26 16:52:14 -07:00
Darren Shepherd
89922efbac
Support requests >=2.1.0
...
Starting with requests 2.1.0 non-HTTP scheme URLs are not parsed anymore.
The net effect of this is that when using the unix socket in docker-py no
query string params are passed in the URL. This change makes docker-py
internally use the scheme http+unix to indicate to requests that this is
still a HTTP URL and should be parsed.
Users of docker-py can still specify 'unix:' as the base_url. The
following forms of base_url are accepted.
http+unix://var/run/docker.sock
unix://var/run/docker.sock
unix:///var/run/docker.sock
http://hostname
tcp://hostname
2014-01-26 16:28:47 -07:00
Joffrey F
3ad4a442be
Merge pull request #146 from felixhummel/fix-readme-binds
...
fix "binds" docs: { host_dir: docker_dir }
2014-01-25 11:32:37 -08:00
Felix Hummel
eefcb065b0
fix "binds" docs: { host_dir: docker_dir }
...
Not the other way around.
2014-01-25 19:04:32 +01:00
Aanand Prasad
f2285cb899
If attaching to stdin, set StdinOnce, as per the docker CLI.
2014-01-20 18:00:40 +00:00
Joffrey F
236bb5f09e
Merge pull request #144 from bfirsh/add-missing-create-container-options
...
Add entrypoint, cpu_shares and working_dir options to create_container
2014-01-20 07:31:38 -08:00
Ben Firshman
4bc5d27e51
Add working_dir option to create_container
2014-01-19 16:41:40 +00:00
Ben Firshman
ab2f7a5e38
Add cpu_shares option to create_container
2014-01-19 16:41:25 +00:00
Ben Firshman
8e8b355acd
Add entrypoint option to create_container
2014-01-19 16:41:08 +00:00
shin-
477831334c
Merge branch 'master' of git://github.com/dotcloud/docker-py
2014-01-16 20:26:06 +01:00
shin-
33f5ac57d8
Removed data argument in import_image (unused?)
2014-01-16 20:25:26 +01:00
shin-
8a5cd6ae65
Merge branch 'feature/image-import' of github.com:tarnfeld/docker-py into tarnfeld-feature/image-import
2014-01-16 20:22:33 +01:00
Joffrey F
4bf75ded43
Merge pull request #119 from ureyes84/master
...
Updated port function
2014-01-16 11:19:34 -08:00
Joffrey F
acbd0661fd
Merge pull request #143 from mpetazzoni/tcp-default-proto
...
Default to /tcp for port definitions in create_container()
2014-01-16 11:16:14 -08:00
Maxime Petazzoni
dad95ba679
Default to /tcp for port definitions in create_container()
...
Fixes #141 .
Signed-off-by: Maxime Petazzoni <max@signalfuse.com>
2014-01-16 10:23:02 -08:00
Maxime Petazzoni
77edd8b601
Merge pull request #138 from aanand/container-output-without-logs
...
container_output() method for streaming the output without logs=1
2014-01-16 09:05:46 -08:00
Maxime Petazzoni
7aba0126cb
Merge pull request #142 from aanand/use-relative-imports
...
Use relative imports
2014-01-16 09:05:14 -08:00
Aanand Prasad
cea085f046
Use relative imports
2014-01-16 13:28:00 +00:00
Aanand Prasad
3cb6482f8a
attach() method now parses multiplexing frames
...
The previous version of `attach` didn't look like it was doing
anything useful, as it just yielded 4096-byte chunks of raw /attach
output, without doing any frame parsing.
Now `attach` is identical to `logs`, except that by default it
doesn't show historical output. `logs` is now a wrapper around
`attach` which sets `logs=True`, and its behaviour is unchanged.
2014-01-16 10:56:17 +00:00
Maxime Petazzoni
d73901a7ed
Merge pull request #140 from aanand/sensible-url-handling
...
Sensible url handling
2014-01-14 10:13:09 -08:00
Aanand Prasad
688554998a
Accept base_url of None
...
This makes it very simple to get identical behaviour to the CLI:
client = Client(os.environ.get('DOCKER_HOST'))
2014-01-14 17:19:39 +00:00
Joffrey F
ebddf043e7
Merge pull request #139 from aanand/no-timeout-on-build
...
Configurable timeout on build(), defaults to None
2014-01-14 09:16:40 -08:00
Aanand Prasad
96932fc1cb
Handle tcp:// URLs
...
This means docker-py will do the Right Thing if the base url is set
using the new `DOCKER_HOST` environment variable, for example.
(http://docs.docker.io/en/latest/commandline/cli/ )
2014-01-14 17:14:27 +00:00
Aanand Prasad
dac4211a85
Break down _post() parameters one-per-line in build()
2014-01-14 15:25:29 +00:00
Aanand Prasad
732b4378ae
Configurable timeout on build(), defaults to None
...
Many commands used in Dockerfiles hang for an extended period of time
without producing any output, which will result in a socket timeout.
Accordingly, it makes sense for build() to specify no timeout by
default.
2014-01-14 13:58:51 +00:00
Joffrey F
2ac5cca84d
Merge pull request #120 from mpetazzoni/improve-auth
...
Rework auth config loading and use of auth data for login/pull/push
2014-01-09 11:00:55 -08:00