From 6895dd993611a4d12b2e87ef8af7f5f888015545 Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Sat, 11 Jul 2015 16:29:25 -0400 Subject: [PATCH] Use get_container_ids method to retrieve container for nginx conf --- plugins/nginx-vhosts/commands | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/plugins/nginx-vhosts/commands b/plugins/nginx-vhosts/commands index 079774ad0..e1ba8bebb 100755 --- a/plugins/nginx-vhosts/commands +++ b/plugins/nginx-vhosts/commands @@ -49,8 +49,13 @@ case "$1" in shopt -u nullglob fi - DOKKU_APP_CONTAINER_ID=$(< "$DOKKU_ROOT/$APP/CONTAINER") - docker cp "$DOKKU_APP_CONTAINER_ID:/app/nginx.conf" "$APP_NGINX_TEMPLATE" 2> /dev/null || true + DOKKU_APP_CIDS=$(get_container_ids $APP) + if [[ -n $DOKKU_APP_CIDS ]]; then + for DOKKU_APP_CID in $DOKKU_APP_CIDS; do + docker cp "$DOKKU_APP_CID:/app/nginx.conf" "$APP_NGINX_TEMPLATE" 2> /dev/null || true + break + done + fi [[ -f "$DOKKU_ROOT/ENV" ]] && source $DOKKU_ROOT/ENV [[ -f "$DOKKU_ROOT/$APP/ENV" ]] && source $DOKKU_ROOT/$APP/ENV