Update 'src/containerspawner/state.py'
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
parent
30c166e77b
commit
3fbf8cd97c
@ -44,11 +44,15 @@ class StateManager:
|
|||||||
name=container_name,
|
name=container_name,
|
||||||
network=CONTAINER_NETWORK,
|
network=CONTAINER_NETWORK,
|
||||||
volumes={container_name: {"bind": CONTAINER_PERSIST}},
|
volumes={container_name: {"bind": CONTAINER_PERSIST}},
|
||||||
|
restart_policy={"Name": "always", "MaximumRetryCount": 5}
|
||||||
detach=True,
|
detach=True,
|
||||||
auto_remove=True
|
auto_remove=True
|
||||||
)
|
)
|
||||||
|
|
||||||
# Wait for container to start.
|
# Wait for container to start.
|
||||||
|
while container.status != "running":
|
||||||
|
time.sleep(1)
|
||||||
|
|
||||||
time.sleep(3)
|
time.sleep(3)
|
||||||
|
|
||||||
# Disable auth.
|
# Disable auth.
|
||||||
@ -56,3 +60,6 @@ class StateManager:
|
|||||||
|
|
||||||
# Install extensions.
|
# Install extensions.
|
||||||
container.exec_run("code-server --install-extension ms-python.python")
|
container.exec_run("code-server --install-extension ms-python.python")
|
||||||
|
|
||||||
|
# Restart container.
|
||||||
|
container.restart()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user