kic-reference-architectures
kic-reference-architectures copied to clipboard
fix: add check for CLI argument in build_dev_docker_image.sh script
Describe the bug Currently, we don't validate if the user has provided an argument on the CLI for the docker image build process. This results in the following error:
+ docker build --build-arg ARCH=arm64v8 --build-arg UID=501 --build-arg GID=501 --build-arg DOCKER_GID=999 --tag kic-ref-arch-pulumi-aws: -f /Users/jschmidt/repos/kic-reference-architectures/pulumi/aws/Dockerfile. /Users/jschmidt/repos/kic-reference-architectures/pulumi/aws
invalid argument "kic-ref-arch-pulumi-aws:" for "-t, --tag" flag: invalid reference format
See 'docker build --help'.
As it tries to tag with a blank as shown above for the version.
To Reproduce Steps to reproduce the behavior:
- Run
build_dev_docker_env.sh
without any arguments. - Boom.
Expected behavior Script checks for $1 and exits w/ an error if it's not found or it defaults with a warning.
Your environment MacOS M1
Additional context None