8000 fixed setting a docker command as a variable with correct quotes usage · Sengorius/docker-proxy-stack@0e8a5c0 · GitHub
[go: up one dir, main page]

Skip to content

Commit 0e8a5c0

Browse files
author
Sengorius
committed
fixed setting a docker command as a variable with correct quotes usage
1 parent 24f6dc2 commit 0e8a5c0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/main.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -196,13 +196,13 @@ function update_host_files_with_proxy() {
196196
# update the /etc/hosts file in any proxy related container with data from .current-hosts file
197197
function publish_host_files() {
198198
local HOST_CONTAINER_SUFFIXES=($(echo $1 | tr "|" "\n"))
199-
local FORMATTED_CONTAINERS=""
199+
local FORMATTED_CONTAINERS=
200200

201201
for NEXT_SUFFIX in ${HOST_CONTAINER_SUFFIXES[@]}; do
202-
FORMATTED_CONTAINERS="${FORMATTED_CONTAINERS} -f name=-${NEXT_SUFFIX} -f name=_${NEXT_SUFFIX}"
202+
FORMATTED_CONTAINERS=${FORMATTED_CONTAINERS}\ -f\ name="-${NEXT_SUFFIX}"\ -f\ name="_${NEXT_SUFFIX}"
203203
done
204204

205-
local TARGET_CONTAINERS=`docker ps -a --format "{{ .Names }}" -f status='running'${FORMATTED_CONTAINERS}`
205+
local TARGET_CONTAINERS=`docker ps -a --format "{{ .Names }}" -f status="running"${FORMATTED_CONTAINERS}`
206206
local COUNTER=0
207207

208208
while read -r CURRENT; do

0 commit comments

Comments
 (0)
0