Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
start_timeout = Integer(
300,
help=DockerSpawner.start_timeout.help,
config=True)
# Override the docker run parameters
extra_host_config = Dict(
{
'volumes_from': ['swarm-data'], # --volumes-from swarm-data
'port_bindings': {8888: None}, # -p 8888:8888
'restart_policy': { # --restart always
'MaximumRetryCount': 0,
'Name': 'always'
},
},
help=DockerSpawner.extra_host_config.help,
config=True)
def __init__(self, **kwargs):
# Use a different docker client for each server
self._client = None
self._carina_client = None
self._docker_config = None
super().__init__(**kwargs)
@property
def client(self):
"""
The Docker client used to connect to the user's Carina cluster
"""
# TODO: Figure out how to configure this without overriding, or tweak a bit and call super