With the Ansible docker_compose
module is it possible to perform a docker-compose pull
and/or docker-compose build
without actually starting the service?
I've attempted:
- name: Build & pull services
become: yes
docker_compose:
project_src: "{{ installation_path }}"
build: yes
state: present
stopped: yes
but this seems to start the services as well (even though I have stopped: yes
).
The actual situation is that starting the services causes ports conflicts with existing processes. So the idea is to:
The problem is that one of these processes is the one that resolves DNS queries so stopping the processes and starting the docker services leads to an attempt to fetch the docker images from the docker registry, failing with a DNS resolution error.
My idea was to:
根据这个 Github 问题,这是不可能的,并且鉴于docker_*
没有得到积极维护,因此在不久的将来可能会保持不变。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.