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>
This commit is contained in:
parent
a4b002a76e
commit
7878d38dee
2 changed files with 11 additions and 0 deletions
|
|
@ -539,6 +539,9 @@ class Service(object):
|
|||
return 1 if not numbers else max(numbers) + 1
|
||||
|
||||
def _get_links(self, link_to_self):
|
||||
if self.use_networking:
|
||||
return []
|
||||
|
||||
links = []
|
||||
for service, link_name in self.links:
|
||||
for container in service.containers():
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue