diff --git a/pkg/docker/entrypoint.sh b/pkg/docker/entrypoint.sh index 843a57f7..c951ba7e 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. @@ -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