attach to network before starting for syslog
@@ -820,19 +820,21 @@ class Tools:
del tool_d[container]['network']
del tool_d[container]['links']
change_networking = True
- cont_id = self.d_client.containers.run(detach=True,
+ cont = self.d_client.containers.create(detach=True,
**tool_d[container])
+ cont_id = cont.id
if change_networking:
network_to_attach = self.d_client.networks.list(
names=[network_name])
if len(network_to_attach) > 0:
- self.logger.info('Attaching to network: {0} with the following link: {1}'.format(
+ self.logger.info('Attaching to network: "{0}" with the following links: {1}'.format(
network_name, links))
network_to_attach[0].connect(cont_id, links=links)
self.logger.info('Detaching from network: bridge')
network_to_detach = self.d_client.networks.list(names=[
'bridge'])
network_to_detach[0].disconnect(cont_id)
+ cont.start()
s_containers.append(container)
manifest.set_option(section, 'running', 'yes')
self.logger.info('started ' + str(container) +
