From 987cfcb6151ca61d83078e2aa4725803cbb76c0c Mon Sep 17 00:00:00 2001 From: ale Date: Mon, 10 Jun 2019 19:36:50 +0100 Subject: [PATCH] Make ports optional in containers --- roles/docker/templates/run.sh.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/docker/templates/run.sh.j2 b/roles/docker/templates/run.sh.j2 index 42fc46a..4473169 100644 --- a/roles/docker/templates/run.sh.j2 +++ b/roles/docker/templates/run.sh.j2 @@ -17,7 +17,7 @@ opts="{{ container.docker_options | default('') }}" {# Port configuration, and bind mounts #} {% if container.get('ports', []) %} {% for port in container.get('ports',[]) %}{{ opt('expose', port) }}{% endfor %} -{% else %} +{% elif container.get('port') %} {{ opt('expose', container.port) }} {% endif %} {{ opt('mount', 'type=tmpfs,destination=/tmp,tmpfs-mode=01777,tmpfs-size=64M') }} -- GitLab