def startContainer(name, runner): container = dockerutils.findContainer(name) if not container: runner() container = dockerutils.findContainer(name) print("Container is ready: {} {}".format(name, container)) return container
def start(options): dataset = options.dataset clientconfigset = options.clientconfigset standalone = clientconfigset is None if standalone: print("start " + dataset + " in background") else: print("start " + dataset + " " + clientconfigset) container = None started = False if dataset: cname = "{}:{}".format(settings.REPOSITORY, settings.populatedTag(dataset)) started = dockerutils.findContainer(cname) == "" container = startContainer( cname, lambda: kolabpopulated.run.main(dataset, standalone)) if clientconfigset == "pep": pep.run.main() elif clientconfigset == "kube": kube.run.main(container) elif clientconfigset == "release": release.run.main() elif clientconfigset == "kubestandalone": kubestandalone.run.main() elif not standalone: kontact.run.main(container, clientconfigset) if started: sh.docker.kill(container) sh.docker.rm(container)
def start(options): dataset = options.dataset clientconfigset = options.clientconfigset standalone = clientconfigset is None if standalone: print("start " + dataset + " in background") else: print("start " + dataset + " " + clientconfigset) container = None started = False if dataset: cname = "{}:{}".format(settings.REPOSITORY, settings.populatedTag(dataset)) started = dockerutils.findContainer(cname) == "" container = startContainer(cname, lambda: kolabpopulated.run.main(dataset, standalone)) if clientconfigset == "pep": pep.run.main() elif clientconfigset == "kube": kube.run.main(container) elif clientconfigset == "release": release.run.main() elif not standalone: kontact.run.main(container, clientconfigset) if started: sh.docker.kill(container) sh.docker.rm(container)
def main(x11forward, server): kolabcontainer = dockerutils.findContainer(server) runargs = [ "-ti", "--rm", "--privileged", "--link", "{}:kolab".format(kolabcontainer), "-v", "~/kdebuild/automatedupdate:/work", "-v", "{}/bashrc:/home/developer/.bashrc".format(BASEPATH), ] if x11forward: x11 = X11Support() x11.setupX11Authorization() runargs.extend(x11.docker_args()) image="kolabclient/presice" runargs.append(image) runargs.extend(["-c","bash"]) args = ["docker","run"] args.extend(runargs) subprocess.call(" ".join(args), shell=True, cwd=settings.SCRIPT_DIR)
def main(x11forward, server): kolabcontainer = dockerutils.findContainer(server) runargs = [ "-ti", "--rm", "--privileged", "--link", "{}:kolab".format(kolabcontainer), "-v", "~/kdebuild/automatedupdate:/work", "-v", "{}/bashrc:/home/developer/.bashrc".format(BASEPATH), ] if x11forward: x11 = X11Support() x11.setupX11Authorization() runargs.extend(x11.docker_args()) image = "kolabclient/presice" runargs.append(image) runargs.extend(["-c", "bash"]) args = ["docker", "run"] args.extend(runargs) subprocess.call(" ".join(args), shell=True, cwd=settings.SCRIPT_DIR)
def shell(options): print "shell " + options.dataset container = dockerutils.findContainer("{}:{}".format( settings.REPOSITORY, settings.populatedTag(options.dataset))) subprocess.call("docker exec -i -t {} bash".format(container), shell=True)
def shell(options): print "shell " + options.dataset container = dockerutils.findContainer("{}:{}".format(settings.REPOSITORY, settings.populatedTag(options.dataset))) subprocess.call("docker exec -i -t {} bash".format(container), shell=True)