Deni Bertovic
69cd38ab86
initial take on adding support for tls auth with client certificates
2014-03-22 14:09:10 +01:00
Darren Shepherd
e8b993ab8a
Use requests to read chunk data instead of parsing the raw stream
...
The previous code had a bug in which it assumed that the chunk data had
no newlines in it. In 0.9.0 newlines were added to the stream results,
which exposed this bug.
2014-03-19 08:43:13 -07:00
Darren Shepherd
d0985b02be
Ensure that stream=True is passed to requests when version >= 1.8
2014-03-19 08:41:59 -07:00
Daniel Graña
b1f1e363a4
remove reference to uninitialized variable and extra parameter in function call
2014-03-18 11:00:16 -03:00
Daniel Graña
159a42ad5f
Fix API version comparison
2014-03-18 11:00:16 -03:00
Karl-Aksel Puulmann
b4605fc728
Styling as per comment, decode to utf-8, join rather concat strings
2014-03-11 22:46:45 +02:00
Karl-Aksel Puulmann
af84a2de72
Python 3 fixes
2014-03-11 19:24:49 +02:00
Jens Deppe
f0b08d8adf
Support 'Domainname' in container creation
2014-03-10 07:47:19 -07:00
Maxime Petazzoni
655b5a304a
Merge pull request #168 from joshuaconner/add_version_title_flag
...
add __title__ and __version__ variables to module
2014-02-24 18:08:52 -08:00
Joshua Conner
8d9b6828f0
add __title__ and __version__ variables to module
2014-02-24 18:01:19 -08:00
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
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
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
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
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
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
Ben Firshman
22f147569b
Allow links to specified as (name, alias) tuples
2014-01-27 15:21:44 +00: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
Aanand Prasad
f2285cb899
If attaching to stdin, set StdinOnce, as per the docker CLI.
2014-01-20 18:00:40 +00: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
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
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
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
Maxime Petazzoni
32ad01e110
Rework auth config loading and use of auth data for login/pull/push
...
Signed-off-by: Maxime Petazzoni <max@signalfuse.com>
2014-01-07 15:30:50 -08:00
Nada Amin
d1427d38be
Option to disable network when creating container.
2014-01-03 16:20:45 +00:00
Jake Moshenko
294b42c6cd
A socket that is wrapped in a file-like object must be set to blocking.
2013-12-31 14:27:05 -05:00
Maxime Petazzoni
ef009e114a
Style fixes for flake8
...
Signed-off-by: Maxime Petazzoni <max@signalfuse.com>
2013-12-24 10:07:25 -08:00
Fedor Korotkiy
09f95768f3
Fix infinite loop in Client.logs(stream=True) caused by connection close.
2013-12-24 12:01:16 +00:00
Joffrey F
792fff6b47
Merge pull request #122 from mpetazzoni/base-url-sanitize
...
Remove trailing slashes in base_url
2013-12-17 05:55:18 -08:00
Maxime Petazzoni
1fe3c041c4
Fix stream receive by correctly reading all required bytes from the socket
...
Signed-off-by: Maxime Petazzoni <max@signalfuse.com>
2013-12-16 15:54:19 -08:00
Maxime Petazzoni
9b4582989b
Remove trailing slashes in base_url. Fixes #108
...
Signed-off-by: Maxime Petazzoni <max@signalfuse.com>
2013-12-16 15:30:44 -08:00
Ulises Reyes
daa3a1e2ef
Shortened lines
2013-12-14 22:28:45 -05:00
Ulises Reyes
f5924c3863
Updated the port function in order to parse the new NetworkSettings Port dict ( fixes #88 )
2013-12-14 22:00:08 -05:00
shin-
64781888e0
Merge branch 'privilege' of github.com:yukw777/docker-py into yukw777-privilege
...
Conflicts:
README.md
tests/test.py
2013-12-13 15:46:54 +01:00
shin-
9bbbb5d3b4
Fixed indentation
2013-12-13 15:27:00 +01:00
Maxime Petazzoni
4bc4ee3cf0
Log streaming and correct decoding of multiplexed log streams
...
Implement log streaming with the stream parameter on logs(), returning a
generator of log lines based on the selected streams (stdout/stderr).
Also correctly decode the multiplexed log streams (current version was
buggy).
Signed-off-by: Maxime Petazzoni <max@signalfuse.com>
2013-12-12 22:26:17 -08:00
Joffrey F
08d6de7ca1
Merge pull request #115 from dotcloud/port_volumes
...
Simplified port bindings and volume mapping
2013-12-09 09:10:26 -08:00
shin-
89f2c58918
Improved port binding conversion rules, fixed bugs, added unit tests
2013-12-09 17:45:12 +01:00
Maxime Petazzoni
c60c0d24a9
Fix _stream_helper
...
The stream helper that yields the streamed status for push, pull and
build operations was reading data in chunks of 4096 bytes but didn't
support buffering and thus didn't behave well when more than 4096 bytes
were received at once from the socket.
This implementation uses makefile() to get a file object from the socket
on which we can use readline() so we can read line by line the
chunked-encoding data streamed to us by the Docker daemon.
Signed-off-by: Maxime Petazzoni <max@signalfuse.com>
2013-12-06 16:44:47 -08:00
Tom Arnfeld
7b7dd4df86
Implement importing images from an image name instead of src
2013-12-06 23:01:00 +00:00
shin-
ef615f5549
Flake8 fix
2013-12-06 21:05:59 +01:00
shin-
e00a7e986a
Simplified port bindings and volume mapping
2013-12-06 21:00:44 +01:00
Fernando
0cb2ce8126
fix auth ping to https
2013-12-06 15:31:15 +00:00
Maxime Petazzoni
f6b345e19c
Correctly pass the response parameter to the HTTPError constructor
...
Signed-off-by: Maxime Petazzoni <max@signalfuse.com>
2013-12-06 15:31:15 +00:00
Maxime Petazzoni
1a83e31d05
Fix under-indented line
...
Signed-off-by: Maxime Petazzoni <max@signalfuse.com>
2013-12-06 15:31:15 +00:00
Maxime Petazzoni
4c4bd95429
Ensure sorted order on links to make unit test deterministic
...
Signed-off-by: Maxime Petazzoni <max@signalfuse.com>
2013-12-06 15:31:15 +00:00
Maxime Petazzoni
db12b61b4d
Restore disabling timeout on image pull
...
Signed-off-by: Maxime Petazzoni <max@signalfuse.com>
2013-12-06 15:30:29 +00:00
Joffrey F
f247844278
Merge pull request #100 from mpetazzoni/pull-timeout
...
Restore disabling timeout on image pull
2013-12-02 07:06:08 -08:00
Joffrey F
91290de38c
Merge pull request #107 from mpetazzoni/fix-apierror-response-message
...
Correctly pass the response parameter to the HTTPError constructor
2013-12-02 07:00:52 -08:00
Fernando
be72e28f65
fix auth ping to https
2013-11-28 01:49:36 -03:00
Maxime Petazzoni
95b12808fc
Correctly pass the response parameter to the HTTPError constructor
...
Signed-off-by: Maxime Petazzoni <max@signalfuse.com>
2013-11-20 14:42:26 -08:00
Maxime Petazzoni
058c2798cc
Fix under-indented line
...
Signed-off-by: Maxime Petazzoni <max@signalfuse.com>
2013-11-19 13:40:03 -08:00
Maxime Petazzoni
8c4c7c3d49
Ensure sorted order on links to make unit test deterministic
...
Signed-off-by: Maxime Petazzoni <max@signalfuse.com>
2013-11-19 13:37:03 -08:00
Peter Yu
e361f4c1cd
Privileged option is part of host config, not config
2013-11-18 21:47:33 +00:00
Maxime Petazzoni
7a3564a746
Restore disabling timeout on image pull
...
Signed-off-by: Maxime Petazzoni <max@signalfuse.com>
2013-11-15 14:56:17 -08:00
shin-
35d3a3c977
Merge branch 'timeout-support' of github.com:mpetazzoni/docker-py into mpetazzoni-timeout-support
...
Conflicts:
docker/client.py
tests/integration_test.py
tests/test.py
2013-11-15 21:44:18 +01:00
shin-
e694d5af3e
Merge branch 'v65-2' of github.com:yukw777/docker-py into yukw777-v65-2
...
Fixed some tests
Conflicts:
docker/client.py
tests/fake_api.py
tests/integration_test.py
tests/test.py
2013-11-15 19:53:10 +01:00
shin-
34df4e5343
Fixed auth stuff for Python 3
2013-11-15 18:38:09 +01:00
shin-
2828833607
Merge branch 'master' of github.com:dotcloud/docker-py into yukw777-link
...
Fixed test_pull and test_pull_stream (don't assume headers content is empty)
Conflicts:
tests/test.py
2013-11-15 18:21:49 +01:00
Maxime Petazzoni
6b3afdcef3
Smarter request timeout for stopping a container
...
Signed-off-by: Maxime Petazzoni <max@signalfuse.com>
2013-11-14 15:45:19 -08:00
Daniel Graña
8561544e30
Add signal argument to kill command
2013-11-14 10:43:57 -02:00
Maxime Petazzoni
0537f3cc80
Disable timeout on image pulls
...
Signed-off-by: Maxime Petazzoni <max@signalfuse.com>
2013-11-13 21:41:55 -08:00
Peter Yu
90d13d5fd2
links implemented. use v1.6 by default now
2013-11-12 16:09:29 +00:00
Maxime Petazzoni
cc3c455629
Refactor timeout passing and standardize with keyword parameters
...
Standardize all HTTP request calls to use keyword parameters for all but
the URL. This makes the refactoring of including the timeout in these
requests' parameters easier and more uniform-looking. Tweaks to the
tests to comply with this new parameter passing scheme, in particular to
the API calls assertions.
Signed-off-by: Maxime Petazzoni <max@signalfuse.com>
2013-11-11 14:02:49 -08:00
shin-
cc67a530d0
Client.logs should work with version < 1.6
2013-11-11 20:43:08 +01:00
shin-
0158adcdd9
Merge branch 'log-fix' of github.com:yukw777/docker-py into yukw777-log-fix
2013-11-11 20:39:31 +01:00
shin-
5b766fc33d
Merge branch 'master' of github.com:dotcloud/docker-py
2013-11-11 20:25:41 +01:00
shin-
ce0fbd1122
Unify socket helpers + naming conventions
2013-11-11 20:20:00 +01:00
shin-
4f6f475fd5
Merge branch 'stream-pull-request' of github.com:yukw777/docker-py into yukw777-stream-pull-request
2013-11-11 19:48:52 +01:00
Joffrey F
ca2d0c6204
Merge pull request #90 from treylane/add-publish-all-ports
...
Support the new PublishAllPorts flag.
2013-11-11 08:19:11 -08:00
shin-
a0fa5c0a52
Merge branch 'paultag-paultag/feature/events'
2013-11-11 17:16:38 +01:00
Peter Yu
a70af55c22
logs now follows the new stream format
2013-11-10 03:33:42 +00:00
Peter Yu
97771b1b2b
links implemented. use v1.6 by default now
2013-11-10 00:27:10 +00:00
Jessica Gadling
70a5c9b0ca
Support the new PublishAllPorts flag.
2013-11-08 21:07:18 -08:00
Maxime Petazzoni
a451119e4a
Allow for configurable timeout on all client requests
...
Signed-off-by: Maxime Petazzoni <max@signalfuse.com>
2013-11-08 15:19:51 -08:00
yukw777
fdd48cff81
pull, push, build are streamable
2013-11-08 21:08:46 +00:00
shin-
1345da7972
Avoid an additional level of indentation
2013-11-08 20:43:50 +01:00
shin-
1d1395464c
Merge branch 'auth-load-config-fix' of github.com:mpetazzoni/docker-py into mpetazzoni-auth-load-config-fix
2013-11-08 20:38:01 +01:00
shin-
e206594014
Merged + events should support JSON data of any size
2013-11-08 20:34:59 +01:00
yukw777
e0df0c7ad2
pull, push, build are streamable
2013-11-08 19:22:23 +00:00
shin-
78667c19a8
Merge branch 'named-container-create' of github.com:mpetazzoni/docker-py into mpetazzoni-named-container-create
2013-11-08 19:28:35 +01:00
shin-
287032cf0e
Don't import websocket-client if environment is python 3 (not supported)
2013-11-08 19:10:41 +01:00
shin-
0901b28957
Merge branch 'attach-websocket' of github.com:aanand/docker-py into aanand-attach-websocket
...
Conflicts:
docker/client.py
2013-11-08 19:03:43 +01:00
shin-
f6159b5593
Fixed lxc_conf param in Client.start to accept dict configurations. Fixes #84
2013-11-08 18:58:10 +01:00
Maxime Petazzoni
9871f8d9ac
Don't fail loading the configuration when .dockercfg doesn't exist
...
Signed-off-by: Maxime Petazzoni <max@signalfuse.com>
2013-11-07 15:38:53 -08:00
Maxime Petazzoni
f344d8e65f
Support naming containers when creating them
...
Add support for passing in the name parameter to the call to
/containers/create to name the created container (API v1.6 feature).
Signed-off-by: Maxime Petazzoni <max@signalfuse.com>
2013-11-06 17:02:38 -08:00
Aanand Prasad
bd938b5879
Use websockets by passing 'ws' param to attach_socket
2013-11-06 17:33:37 +00:00
Paul Tagliamonte
9a98e7fc8c
Add events endpoint to the Client
...
This is a bit of a hack; I added a method (and did a slight refactor of
the old one) to handle getting the raw socket from the requests
request. If the attach_sockets method isn't public, I'd suggest
removing it entirely for a slightly more general one.
This also needs some attention paid to validating legnth, and properly
parsing the returned data by using the length.
Signed-off-by: Paul Tagliamonte <tag@pault.ag>
2013-11-05 22:20:50 -05:00
Roberto Aguilar
5d6bf51b4f
Added Docker 0.6.5 ports compatibility
2013-11-04 14:12:30 -08:00
shin-
41750ea172
Merged
2013-10-23 20:04:15 +02:00
shin-
e56bc51fe2
Fixed ImportErrors / package structure
2013-10-23 20:03:04 +02:00
Joffrey F
e44b59f7ce
Merge pull request #69 from gatoralli/patch-1
...
Fixed typo
2013-10-23 10:48:52 -07:00
Jason Sommer
b438d028dc
Fixed typo
2013-10-20 05:25:19 -05:00
Fernando
48604fd63a
fix import ping function used when pushing an image
2013-10-19 18:27:48 -03:00
shin-
8be4c1f0d3
command param in create_container is optional (for images that come with a predefined default command)
2013-10-16 17:34:46 +02:00
shin-
97bd69162a
Added support for unix:/// protocol (default for docker CLI)
2013-10-16 17:30:57 +02:00
shin-
acd2607407
Flake8 compliance + flake8 tests in tox.ini
2013-10-15 21:15:01 +02:00
shin-
f82506e942
Merge branch 'master' of https://github.com/dotcloud/docker-py
2013-10-15 19:20:03 +02:00
shin-
0808905636
Refactoring, Python 3 compatibility, Tests working with python 3, cleaned up imports.
2013-10-15 19:19:20 +02:00
Joffrey F
6fe13a3b84
Merge pull request #63 from aanand/remove-custom-404-message
...
Remove custom error message for image 404
2013-10-14 07:54:25 -07:00
shin-
07d791d50c
Moved docstrings into README.md for consistency.
2013-10-14 16:39:52 +02:00
shin-
cf46c4d2d9
Merge branch 'doc_fix' of git://github.com/kiorky/docker-py into kiorky-doc_fix
2013-10-14 16:31:08 +02:00
shin-
c79045b43c
Fix: push on private repositories.
2013-10-09 22:23:04 +02:00
Aanand Prasad
0739be1565
Remove custom error message for image 404
2013-10-03 15:15:22 +01:00
Aanand Prasad
cf35b38433
Support https:// URLs (replacing with wss://) when attaching websocket
2013-10-03 14:44:33 +01:00
Aanand Prasad
6e659ba12a
Move creation of websocket connection to its own method, so subclasses can override
2013-10-03 14:44:33 +01:00
Aanand Prasad
c2d867b117
Implement attach_websocket() for attaching with WebSockets instead of HTTP streaming
2013-10-03 14:44:33 +01:00
Deni Bertovic
1ce8dc962c
python3 fixes
...
Fixed imports to be compatible with python3 on various places in the client lib
and in the tests themselves.
2013-10-03 11:55:02 +02:00
Deni Bertovic
5fe16773d9
fixed exception handling in _raise_for_status
2013-10-03 11:51:12 +02:00
Mathieu Le Marec - Pasquet
64f7807fbe
Documentation for binds
2013-09-30 23:53:47 +02:00
shin-
26b291bd32
only_ids in /containers/ps removed, filter on client side
2013-09-30 20:11:42 +02:00
shin-
6c55b63f22
Removed logger dependency (no warnings) + do not break push for API versions < 1.5
2013-09-30 19:57:10 +02:00
Mathieu Le Marec - Pasquet
b2c2a1b87f
Fix: authorized but warned non loggued pull/push
2013-09-30 18:17:55 +02:00
Joffrey F
fadc6f2f42
Merge pull request #56 from kiorky/import_image_tarball
...
support tarball imports
2013-09-30 09:04:07 -07:00
Mathieu Le Marec - Pasquet
2ecc7990cb
support tarball imports
2013-09-30 18:00:06 +02:00
dmp
0c41f6ff9b
Support rm parameter for build
2013-09-28 15:42:43 +02:00
shin-
4c4e66a012
Fixed bugs in Client.login
2013-09-25 18:48:04 +02:00
Joffrey F
b01c1bf1fc
Merge pull request #45 from dotcloud/43-urllib3-dep
...
If requests.packages.urllib3 isn't present try to import urllib3 directly
2013-09-23 08:53:19 -07:00
Adrien Candiotti
cc9e96f546
Update utils.py - the tar function in utils is a non member function but has a self.
...
The problem explained in the title cause the build function of the client to fail when giving a folder parameter : the tar function is called with only one parameter.
2013-09-22 22:35:33 -07:00
shin-
53af7e8140
If requests.pqckqges.urllib3 isn't present try to import urllib3 directly
2013-09-20 16:54:30 +02:00
shin-
afba52dcdd
Added utils.ping and used to expand registry URL (http VS https)
2013-09-14 00:55:48 +02:00
shin-
addecd4942
Updated changelog
2013-09-12 01:17:34 +02:00
shin-
e07e0599e8
Added lxc_conf param to Client.start
2013-09-12 00:28:11 +02:00
shin-
e2e5b9e0fd
Merge branch 'master' into 0.2.0-dev
2013-09-12 00:00:06 +02:00
shin-
b712028f74
Merge branch 'master' of https://github.com/dotcloud/docker-py
2013-09-11 23:45:36 +02:00
shin-
c8e5a6dab1
Methods that previously supported multi-args are now single-argument. Doc and tests updated accordingly.
2013-09-11 23:44:58 +02:00
shin-
58bc2be5a5
Merge branch 'implement-top-and-copy' of git://github.com/aanand/docker-py into 0.2.0-dev
2013-09-11 21:21:18 +02:00
shin-
9a92d68cf1
Merge branch 'better-error-reporting' of git://github.com/aanand/docker-py into 0.2.0-dev
...
Conflicts:
docker/__init__.py
docker/client.py
2013-09-11 21:14:42 +02:00
shin-
b0b4eee453
newline
2013-09-11 21:05:40 +02:00
shin-
60ecc31e61
Fixed some issues with Client.pull + added auth support if version>=1.5
2013-09-11 21:04:36 +02:00
shin-
208fb0366f
Use pseudo-constant for index URL
2013-09-10 20:38:14 +02:00
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