Daniel Nephin
841ed4ed21
Remove the duplicate 'Warning' prefix now that the logger adds the prefix.
...
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2015-10-29 14:18:28 -04:00
Daniel Nephin
b6b9b002e5
Merge pull request #2254 from mnowster/1756-dont-display-output-from-previous-runs
...
1756 dont display output from previous runs
2015-10-27 18:45:47 -04:00
Mazz Mosley
76d52b1c5f
Remove redundant try/except
...
Code cleanup. We no longer need this as the api returns a 304 for any
stopped containers, which doesn't raise an error.
Signed-off-by: Mazz Mosley <mazz@houseofmnowster.com>
2015-10-27 17:12:18 +00:00
Mazz Mosley
30a84f1be6
Move rename functionality into Container
...
Signed-off-by: Mazz Mosley <mazz@houseofmnowster.com>
2015-10-27 17:12:18 +00:00
Mazz Mosley
7603ebea9b
Attach to a container's log_stream before they're started
...
So we're not displaying output of all previous logs for a container, we attach,
if possible, to a container before the container is started.
LogPrinter checks if a container has a log_stream already attached and
print from that rather than always attempting to attach one itself.
Signed-off-by: Mazz Mosley <mazz@houseofmnowster.com>
2015-10-27 17:12:18 +00:00
Daniel Nephin
7878d38dee
Fix running one-off containers with --x-networking by disabling linking to self.
...
docker create fails if networking and links are used together.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2015-10-27 11:11:15 -04:00
mnowster
5d60fbe31e
Merge pull request #1659 from viranch/hostip-random-port
...
Allow scaling services that have port binding of the form `host_ip::container_port`
2015-10-23 17:11:28 +01:00
mnowster
fb69391889
Merge pull request #2233 from dnephin/some_unit_test_cleanup
...
Cleanup some unit tests and whitespace
2015-10-21 10:39:28 +01:00
Daniel Nephin
b1f8ed84a3
Cleanup some unit tests and whitespace.
...
Remove some unnecessary newlines.
Remove a unittest that was attempting to test behaviour that was removed a while ago, so isn't testing anything.
Updated some unit tests to use mocks instead of a custom fake.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2015-10-20 14:23:56 -04:00
Daniel Nephin
5523c3d745
Minor refactor to use guard and replace instead of split+join
...
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2015-10-20 12:09:01 -04:00
Daniel Nephin
3f0e083585
Force windows drives to be lowercase.
...
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2015-10-20 11:39:06 -04:00
Viranch Mehta
258c8bc54d
Fix specifies_host_port() to handle port binding with host IP but no host port
...
Signed-off-by: Viranch Mehta <viranch.mehta@gmail.com>
2015-10-18 00:40:51 +05:30
Aanand Prasad
d5f5eb1924
Enable use of Docker networking with the --x-networking flag
...
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2015-10-14 11:19:43 -04:00
Mohit Soni
f4efa29377
Added support for cgroup_parent
...
This change adds cgroup-parent support to compose project. It allows
each service to specify a 'cgroup_parent' option.
Signed-off-by: Mohit Soni <mosoni@paypal.com>
2015-10-14 15:02:42 +01:00
Aanand Prasad
627f1acdc4
Merge pull request #2126 from mnowster/1188-support-ro-options-in-volumes-from
...
1188 support ro options in volumes from
2015-10-07 11:57:14 +01:00
Mazz Mosley
f9028703f4
Pick the first container
...
Rather than inefficiently looping through all the containers that a
service has and overriding each volumes_from value, pick the first
one and return that.
Signed-off-by: Mazz Mosley <mazz@houseofmnowster.com>
2015-10-07 11:27:13 +01:00
Mazz Mosley
0ff84a78c6
Use multiple returns rather than overriding.
...
Also added a doc string for clarity.
Signed-off-by: Mazz Mosley <mazz@houseofmnowster.com>
2015-10-07 11:27:13 +01:00
Mazz Mosley
467c731869
address PR feedback
...
Signed-off-by: Mazz Mosley <mazz@houseofmnowster.com>
2015-10-07 11:27:13 +01:00
Daniel Nephin
15d0c60a73
Fix split buffer with inconsistently delimited json objects.
...
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2015-10-06 10:43:07 -04:00
Daniel Nephin
3661e8bc74
Fix build against the swarm cluster by joining buffered output before parsing json.
...
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2015-10-06 10:37:05 -04:00
Vincent Demeester
5b55a08846
Add support for ro option in volumes_from
...
Fixes #1188
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2015-10-06 13:12:55 +01:00
Mazz Mosley
2276326d7e
volume path compatibility with engine
...
An expanded windows path of c:\shiny\thing:\shiny:rw
needs to be changed to be linux style path, including the drive,
like /c/shiny/thing /shiny
to be mounted successfully by the engine.
Signed-off-by: Mazz Mosley <mazz@houseofmnowster.com>
2015-10-02 12:01:56 +01:00
Mazz Mosley
f4cd5b1d45
Handle windows volume paths
...
When a relative path is expanded and we're on a windows platform,
it expands to include the drive, eg C:\ , which was causing a ConfigError
as we split on ":" in parse_volume_spec and that was giving too many parts.
Use os.path.splitdrive instead of manually calculating the drive.
This should help us deal with windows drives as part of the volume
path better than us doing it manually.
Signed-off-by: Mazz Mosley <mazz@houseofmnowster.com>
2015-10-01 16:06:57 +01:00
Vojta Orgon
c9083e21c8
Flag to skip all pull errors when pulling images.
...
Signed-off-by: Vojta Orgon <villlem@gmail.com>
2015-09-21 11:59:23 +02:00
Aanand Prasad
3e58003bd3
Merge pull request #2041 from ggtools/master
...
Add new --pull option in build.
2015-09-18 16:49:05 +01:00
Daniel Nephin
aab688d27e
Merge pull request #1886 from mnowster/create-host-config-needs-version
...
Stop using deprecated `create_host_config` from utils
2015-09-17 12:37:22 -04:00
mnowster
1c823597bb
Merge pull request #1995 from predakanga/master
...
Added support for IPC namespaces, fixes GH-1689
2015-09-17 17:14:44 +01:00
Mazz Mosley
42c890796b
Use docker.client.create_host_config
...
create_host_config from docker.utils will be deprecated so that
the new create_host_config has access to the _version so
we can ensure that network_mode only gets set to 'default' by
default if the version is high enough and won't explode.
Signed-off-by: Mazz Mosley <mazz@houseofmnowster.com>
2015-09-17 17:11:00 +01:00
Christophe Labouisse
39786d4da7
Add new --pull option in build.
...
Signed-off-by: Christophe Labouisse <christophe@labouisse.org>
2015-09-15 20:19:17 +02:00
Mazz Mosley
fb96ed113a
Stop sending json-file by default
...
By doing this we were over-riding any of the daemon's defaults.
Instead we can send an empty string which docker-py sends on
and the daemon interprets as, 'json-file' as a default if it
hasn't got any other daemon level config options.
Signed-off-by: Mazz Mosley <mazz@houseofmnowster.com>
2015-09-15 15:47:39 +01:00
Aanand Prasad
1c73ff33fe
Merge pull request #1990 from shin-/1975-fix
...
Remove or space out suspension dots after service name
2015-09-08 12:27:39 -07:00
Lachlan Pease
2468235472
Added support for IPC namespaces, fixes GH-1689
...
Signed-off-by: Lachlan Pease <predatory.kangaroo@gmail.com>
2015-09-06 12:09:24 +10:00
Joffrey F
6da7a9194c
Remove or space out suspension dots after service name for easier copy-pasting
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2015-09-04 17:43:12 -07:00
Daniel Nephin
0484e22a84
Add enum34 and use it to create a ConvergenceStrategy enum.
...
Signed-off-by: Daniel Nephin <dnephin@gmail.com>
2015-09-04 10:45:53 -04:00
Daniel Nephin
db9f577ad6
Extract link names into a function.
...
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2015-09-03 14:08:44 -04:00
Daniel Nephin
187ad4ce26
Refactor network_mode logic out of Service.
...
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2015-09-03 13:02:46 -04:00
Daniel Nephin
c183e52502
Fixes #1757 - include all service properties in the config_dict()
...
Signed-off-by: Daniel Nephin <dnephin@gmail.com>
2015-09-03 12:04:38 -04:00
Daniel Nephin
ef56523883
Make external_links a regular service.option so that it's part of the config hash
...
Signed-off-by: Daniel Nephin <dnephin@gmail.com>
2015-09-03 12:04:38 -04:00
Daniel Nephin
d264c2e33a
Resolves #1804
...
Fix mutation of service.options when a label or environment variable is specified in the config.
Signed-off-by: Daniel Nephin <dnephin@gmail.com>
2015-08-27 18:05:21 -04:00
Daniel Nephin
d2718bed99
Allow setting a one-off container name
...
Signed-off-by: Daniel Nephin <dnephin@gmail.com>
2015-08-26 13:33:03 -04:00
Daniel Nephin
71ff872e8e
Update unit tests for stream_output to match the behaviour of a docker-py response.
...
Signed-off-by: Daniel Nephin <dnephin@gmail.com>
2015-08-25 10:48:48 -04:00
Daniel Nephin
feaa4a5f1a
Unit tests passing again.
...
Signed-off-by: Daniel Nephin <dnephin@gmail.com>
2015-08-25 10:47:06 -04:00
Daniel Nephin
2943ac6812
Cleanup requirements.txt so we don't have to maintain separate copies for py2 and py3.
...
Signed-off-by: Daniel Nephin <dnephin@gmail.com>
2015-08-25 10:46:08 -04:00
Daniel Nephin
809443d6d0
Support python 3
...
Signed-off-by: Daniel Nephin <dnephin@gmail.com>
2015-08-25 10:37:29 -04:00
Daniel Nephin
59d4f304ee
Run pre-commit on all files
...
Signed-off-by: Daniel Nephin <dnephin@gmail.com>
2015-08-24 17:04:50 -04:00
Frank Sachsenheim
dd738b380b
Makes Service.config_hash a property
...
Signed-off-by: Frank Sachsenheim <funkyfuture@riseup.net>
2015-08-21 12:43:13 +02:00
Frank Sachsenheim
227584b864
Adds pause and unpause-commands
...
Signed-off-by: Frank Sachsenheim <funkyfuture@riseup.net>
2015-08-21 12:43:13 +02:00
Karol Duleba
56f03bc20a
Allow to specify image by digest. Fixes #1670
...
Signed-off-by: Karol Duleba <mr.fuxi@gmail.com>
2015-08-19 21:13:34 +01:00
Aanand Prasad
ed31673069
Merge pull request #1827 from mnowster/port-ranges
...
Port ranges
2015-08-12 11:17:22 +01:00
Aanand Prasad
fb4c9fbb8b
Merge pull request #1808 from mnowster/129-validate-compose-yml
...
129 validate compose yml
2015-08-12 11:15:47 +01:00