kopia lustrzana https://github.com/jupyterhub/repo2docker
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
rodzic
9fca3bf480
commit
9adb8aa947
|
@ -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:
|
||||
|
|
Ładowanie…
Reference in New Issue