From f84f45002da7c15c41dd711e33625c96bb64e771 Mon Sep 17 00:00:00 2001 From: Igor Peshansky Date: Thu, 12 Jul 2018 13:04:07 -0400 Subject: [PATCH 1/2] The entrypoint script uses bash expressions, so should be run with /bin/bash. --- pkg/docker/entrypoint.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/docker/entrypoint.sh b/pkg/docker/entrypoint.sh index 843a57f7..0d807d2d 100755 --- a/pkg/docker/entrypoint.sh +++ b/pkg/docker/entrypoint.sh @@ -1,8 +1,8 @@ -#!/bin/sh +#!/bin/bash set -e # This docker image supports sending either a flag or a command as the docker -# command. When a flag is sent, it will be passed on to the metadata agent +# command. When a flag is sent, it will be passed on to the metadata agent # process. Anything else will be interpreted as the command to be run. # # Passing a flag. From ffcbf6d8540dfd2a74be111b9c98239689f8f172 Mon Sep 17 00:00:00 2001 From: Igor Peshansky Date: Thu, 12 Jul 2018 13:27:16 -0400 Subject: [PATCH 2/2] Tag a bash-ism with a comment. --- pkg/docker/entrypoint.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/pkg/docker/entrypoint.sh b/pkg/docker/entrypoint.sh index 0d807d2d..c951ba7e 100755 --- a/pkg/docker/entrypoint.sh +++ b/pkg/docker/entrypoint.sh @@ -14,6 +14,7 @@ set -e # Default behavior uses CMD defined in Dockerfile. # $ docker run -it {image:tag} +# Note: substring substitution is a bash-ism. if [ "${1:0:1}" = '-' ]; then set -- /opt/stackdriver/metadata/sbin/metadatad "$@" fi