diff --git a/hooks/build b/hooks/build index d979609..335c540 100755 --- a/hooks/build +++ b/hooks/build @@ -2,10 +2,10 @@ set -e -while read docker_version compose_version; +while read -r docker_version compose_version; do docker build \ - --build-arg DOCKER_VERSION=${docker_version} \ - --build-arg COMPOSE_VERSION=${compose_version} \ - -t $DOCKER_REPO:${docker_version} . + --build-arg DOCKER_VERSION="${docker_version}" \ + --build-arg COMPOSE_VERSION="${compose_version}" \ + -t "${DOCKER_REPO}:${docker_version}" . done < DOCKER_AND_COMPOSE_VERSION_MATRIX diff --git a/hooks/push b/hooks/push index c7a50bb..239b2a0 100755 --- a/hooks/push +++ b/hooks/push @@ -2,9 +2,9 @@ set -e -images=`docker image ls ${DOCKER_REPO} --format "{{.Repository}}:{{.Tag}}"`; +images=$(docker image ls "${DOCKER_REPO}" --format "{{.Repository}}:{{.Tag}}"); for image in ${images}; do - docker image push ${image} + docker image push "${image}" done diff --git a/hooks/test b/hooks/test index 64c81a3..942cae4 100755 --- a/hooks/test +++ b/hooks/test @@ -2,7 +2,7 @@ set -e -images=`docker image ls ${DOCKER_REPO} --format "{{.Repository}}:{{.Tag}}"`; +images=$(docker image ls "${DOCKER_REPO}" --format "{{.Repository}}:{{.Tag}}"); for image in ${images}; do