Tag: 循环

Docker与Apache正在循环重启

我有一个运行Docker(版本17.05.0-ce,版本89658be)和docker-compose(版本1.16.1,版本6d1ac21)支持的应用程序的Ubuntu 14.04。 其中一个docker工具包含一个正在重复循环的Apache。 有没有办法解决这个问题,而不会丢失docker定制?

docker在执行time.sleep(1)时在python循环中调用

通过使用docker-compose和python:2.7 ,它仅while 1单独执行while 1循环和time.sleep(1)时正常运行。 但是当它们一起执行的时候会发生什么。 这是docker版本和我的mac上的文件内容 tmp docker -v Docker version 1.12.5, build 7392c3b tmp cat docker-compose.yml version: '2' services: test: image: python:2.7 command: [python, -c, "print 0\nwhile 1:\n\tprint 1\n\tbreak"] tmp docker-compose up Creating network "tmp_default" with the default driver Creating tmp_test_1 Attaching to tmp_test_1 test_1 | 0 test_1 | 1 tmp_test_1 exited with code […]

如何将string拆分为数组和循环呢?

我有一个像这样的stringvariablesRCD_APIS=backend,api-alerting,api-tracking,api-versioning ,其中包含我的泊坞窗图像的名称。 我需要将其分成一个数组,并循环它,所以我可以拉每个泊坞窗图像 我已经尝试了with_sequence循环,但我只得到索引(1,2,3,..) – name: pull images from registry docker_image: name: "hostname:5000/{{ RCD_APIS.split(',') }}" pull: true state: present tag: "{{RCD_VERSION_CURRENT}}" with_sequence: count={{ RCD_APIS|count }} 我也尝试with_item循环,但它不工作,所以我试图debugging: vars: – container: "{{ RCD_APIS }}" tasks: – name: pull images from registry debug debug: var={{item|basename}} with_items: container.split(',') 我得到像这样的东西: (item=container.split(',')) => { "container.split(',')": [ "backend", "api-alerting", "api-tracking", "api-versioning", "connecteur-gdfa", […]

任何CI服务是否允许您构buildDocker容器并使用Docker构buildcaching?

我有一堆Docker容器,都使用docker-compose(之前的图)来连接起来。 我发现自称为“Docker CI”服务的服务通常只是在谈论使用Docker来运行他们的构build工作人员。 我想要一个持续的集成服务,在运行之间保留Docker构buildcaching,而不是启动一个全新的工作/文件系统/构build上下文。 否则,build立绝对永远。 理想的pipe理(与https://github.com/groupon/DotCi不同,CircleCI没有随时可用的构build数据库)。 我发现的唯一的东西就是TeamCity(老的,你不能像使用CircleCI一样容易地在yaml文件中编译任务,你必须维护基础设施等)。 Quay.io没有提供像CircleCI和Travis这样的数据库,所以你必须分叉dev和prod,并在容器内部安装一个,并在容器构build期间运行unit testing(例如 – 你不能产生一个未build成的容器debugging的东西!)。 如何在Docker容器集群上运行持续集成?