def start_container(tag, command=DOCKER_RUN):
 if (tag is not None):
  docker_run = (command + (':%s' % tag))
 else:
  docker_run = (command + ':latest')
 try:
  container_id = subprocess.check_output(docker_run, shell=True)
 except subprocess.CalledProcessError as cpe:
  print ('w3af container failed to start: "%s"' % cpe)
  sys.exit(1)
 else:
  time.sleep(1)
  return container_id.strip()

def start_container ( tag , command = DOCKER_RUN ) : if ( tag is not None ) : docker_run = ( command + ( ':%s' % tag ) ) else : docker_run = ( command + ':latest' ) try : container_id = subprocess . check_output ( docker_run , shell = True ) except subprocess . CalledProcessError as cpe : print ( 'w3af container failed to start: "%s"' % cpe ) sys . exit ( 1 ) else : time . sleep ( 1 ) return container_id . strip ( )
start a new w3af container so we can connect using ssh and run w3af :return: the container id we just started .