Use host networking when running

Since we only expect this to be happening on users computers
when they are running this to test, host networking solves a
bunch of surprises around access to ports, as well as figuring
out which port the notebook should be listening on (since it
can just rely on the logic inside the notebook)

Dangerous when run on a cloud environment!
pull/6/head
yuvipanda 2017-05-22 23:00:47 -07:00
rodzic 9fca3bf480
commit 9adb8aa947
1 zmienionych plików z 3 dodań i 1 usunięć

Wyświetl plik

@ -105,6 +105,8 @@ class Repo2Docker(Application):
config=True,
help="""
Run the image after it is built, if the build succeeds.
DANGEROUS WHEN DONE IN A CLOUD ENVIRONMENT! ONLY USE LOCALLY!
"""
)
@ -177,7 +179,7 @@ class Repo2Docker(Application):
client = docker.from_env(version='auto')
container = client.containers.run(
self.output_image_spec,
ports={'8888/tcp': 8888},
network_mode='host',
detach=True
)
try: