Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
self.user.name
)
start_command.extend(make_nginx_start_command(nginx_config))
start_command.extend(make_custom_start_command(self.everware_config['start_command']))
else:
start_command.extend(make_default_start_command(self.get_env()))
extra_create_kwargs.update({
'command': start_command.get_single_command()
})
extra_host_config = {
'port_bindings': {
self.container_port: (self.container_ip,)
}
}
ip, port = yield DockerSpawner.start(self, image,
extra_create_kwargs=extra_create_kwargs,
extra_host_config=extra_host_config)
return ip, port
self.log.debug("Swarm nodes are: {}".format(self.node_info))
# specify extra host configuration
if extra_host_config is None:
extra_host_config = {}
if 'mem_limit' not in extra_host_config:
extra_host_config['mem_limit'] = '1g'
# specify extra creation options
if extra_create_kwargs is None:
extra_create_kwargs = {}
if 'working_dir' not in extra_create_kwargs:
extra_create_kwargs['working_dir'] = self.homedir
# start the container
yield DockerSpawner.start(
self, image=image,
extra_create_kwargs=extra_create_kwargs,
extra_host_config=extra_host_config)
# figure out what the node is and then get its ip
name = yield self.lookup_node_name()
self.user.server.ip = self.node_info[name]
self.log.info("{} was started on {} ({}:{})".format(
self.container_name, name, self.user.server.ip, self.user.server.port))
self.log.info(self.env)
self.log.debug("Swarm nodes are: {}".format(self.node_info))
# specify extra host configuration
if extra_host_config is None:
extra_host_config = {}
if 'mem_limit' not in extra_host_config:
extra_host_config['mem_limit'] = '1g'
# specify extra creation options
if extra_create_kwargs is None:
extra_create_kwargs = {}
if 'working_dir' not in extra_create_kwargs:
extra_create_kwargs['working_dir'] = self.homedir
# start the container
yield DockerSpawner.start(
self, image=image,
extra_create_kwargs=extra_create_kwargs,
extra_host_config=extra_host_config)
# figure out what the node is and then get its ip
name = yield self.lookup_node_name()
self.user.server.ip = self.node_info[name]
self.log.info("{} was started on {} ({}:{})".format(
self.container_name, name, self.user.server.ip, self.user.server.port))
self.log.info(self.env)