kopia lustrzana https://github.com/jupyterhub/repo2docker
Kill the container when our program exits
rodzic
eac759ccd4
commit
9fca3bf480
|
@ -180,8 +180,13 @@ class Repo2Docker(Application):
|
|||
ports={'8888/tcp': 8888},
|
||||
detach=True
|
||||
)
|
||||
for line in container.logs(stream=True):
|
||||
self.log.info(line.decode('utf-8').rstrip(), extra=dict(phase='running'))
|
||||
try:
|
||||
for line in container.logs(stream=True):
|
||||
self.log.info(line.decode('utf-8').rstrip(), extra=dict(phase='running'))
|
||||
finally:
|
||||
self.log.info('Stopping container...', extra=dict(phase='running'))
|
||||
container.kill()
|
||||
container.remove()
|
||||
|
||||
def start(self):
|
||||
# HACK: Try to just pull this and see if that works.
|
||||
|
|
Ładowanie…
Reference in New Issue