Skip to content

Instantly share code, notes, and snippets.

@alexandernilsson
Created July 4, 2014 14:00
Show Gist options
  • Save alexandernilsson/1e4ea85099196b2787ec to your computer and use it in GitHub Desktop.
Save alexandernilsson/1e4ea85099196b2787ec to your computer and use it in GitHub Desktop.
Hack to read exposed ports from container options in deimos
inner = inner_ports(image)
if inner == []:
log.info("no port exposed in image, looking for --expose")
for i, opt in enumerate(options):
if opt == "--expose":
log.info("found " + opt)
inner = [int(options[i+1])]
break
port_pairings = list(itertools.izip_longest(ports, inner))
@alexandernilsson
Copy link
Author

Replace line 21 in deimos/docker.py with this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment