mirror of
https://github.com/ansible-collections/community.docker.git
synced 2026-07-29 19:57:58 +00:00
Fix AZP tests, add current_container_facts module (#48)
* Add new facts module for determining whether the module is running inside a container or not. * Add containers to main network. * Fix running tests locally with newer docker. * Simplify setup_openssl to only install cryptography. * Add alias in network. * Make sure to upgrade cryptography to something more sensible on Ubuntu 16.04. * Don't jump through hoops for bridge. * Try to use other IPv4 nets. * Improve module docs.
This commit is contained in:
@@ -44,6 +44,15 @@
|
||||
name: '{{ docker_registry_container_name_registry }}'
|
||||
image: "{{ docker_test_image_registry }}"
|
||||
ports: 5000
|
||||
network_mode: '{{ current_container_network_ip | default(omit, true) }}'
|
||||
# We need to define the alias `real-registry` here because the global `links`
|
||||
# option for the NGINX containers (see setup-frontend.yml) does not work when
|
||||
# using networks.
|
||||
networks: >-
|
||||
{{
|
||||
[dict([['name', current_container_network_ip], ['aliases', ['real-registry']]])]
|
||||
if current_container_network_ip not in ['', 'bridge'] else omit
|
||||
}}
|
||||
register: registry_container
|
||||
|
||||
- name: Get registry URL
|
||||
|
||||
Reference in New Issue
Block a user