Here’s a quick way to provide a default value to a bash script in case one is not passed in as an argument:

build-docker-image.sh

#!/bin/bash

tag=${1:-latest}

docker build -t my_docker_image:$tag .
// usage

./scripts/build-docker-image.sh 1.3.0
# => my_docker_image:1.3.0

./scripts/build-docker-image.sh
# => my_docker_image:latest