From 98007791fcec64a5f6e59167b4eed4fc0b5c4dc7 Mon Sep 17 00:00:00 2001 From: alexktz Date: Thu, 7 May 2020 10:34:32 -0400 Subject: [PATCH] Added extra_hosts compatibility --- templates/docker-compose.yml.j2 | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/templates/docker-compose.yml.j2 b/templates/docker-compose.yml.j2 index b5d1ba9..6ff5e44 100644 --- a/templates/docker-compose.yml.j2 +++ b/templates/docker-compose.yml.j2 @@ -7,6 +7,12 @@ services: {{ container.service_name }}: image: {{ container.image }} container_name: {{ container.container_name }} +{% if container.extra_hosts is defined %} + extra_hosts: +{% for extra_host in extra_hosts %} + - {{ extra_host }} +{% endfor %} +{% endif %} {% if container.network_mode is defined %} network_mode: {{ container.network_mode }} {% endif %}