From: Eric Hoxworth Date: Fri, 8 May 2015 15:04:30 +0000 (-0500) Subject: Added config name check to prevent docker name errors after build. X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=87756d6d65131df1be04a19a274754fe22c620fe;p=discourse_docker.git Added config name check to prevent docker name errors after build. --- diff --git a/launcher b/launcher index 57f034b..2d47ff2 100755 --- a/launcher +++ b/launcher @@ -4,6 +4,16 @@ command=$1 config=$2 opt=$3 +# Docker doesn't like uppercase characters, spaces or special characters, catch it now before we build everything out and then find out +re='[A-Z/ !@#$%^&*()+~`=]' +if [[ $config =~ $re ]]; + then + echo + echo "ERROR: Config name must not contain upper case characters, spaces or special characters. Correct config name and rerun $0." + echo + exit 1 +fi + cd "$(dirname "$0")" docker_min_version='1.2.0'