First log in to the registry
aws ecr get-login-password --region us-east-1 | docker login --username AWS --password-stdin 658464581062.dkr.ecr.us-east-1.amazonaws.com
Run script with github released version as first argument
./build.sh ${VERSION}
Example
./build.sh GreatVoyage-v4.2.2.1
Image tag name would be 4.2.2.1