2020-01-28 17:52:45 +00:00
|
|
|
#!/usr/bin//env bash
|
|
|
|
|
|
|
|
TAG=$1
|
|
|
|
|
|
|
|
function require() {
|
|
|
|
if [ "$1" = "" ]; then
|
|
|
|
echo "input '$2' required"
|
|
|
|
print_help
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
function print_help() {
|
|
|
|
echo "build.sh"
|
|
|
|
echo ""
|
|
|
|
echo "Usage:"
|
|
|
|
echo " build.sh [tag]"
|
|
|
|
echo ""
|
|
|
|
echo "Args:"
|
2020-02-14 17:25:52 +00:00
|
|
|
echo " tag: The tag of the synapse image that is being produced"
|
2020-01-28 17:52:45 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
require "$TAG" tag
|
|
|
|
|
|
|
|
set -xe
|
|
|
|
|
|
|
|
docker build \
|
|
|
|
--pull \
|
|
|
|
--no-cache \
|
|
|
|
-f Dockerfile \
|
|
|
|
-t "asonix/synapse:$TAG-arm64v8" \
|
|
|
|
-t asonix/synapse:latest-arm64v8 \
|
|
|
|
-t asonix/synapse:latest \
|
|
|
|
.
|
|
|
|
|
|
|
|
docker push "asonix/synapse:$TAG-arm64v8"
|
|
|
|
docker push asonix/synapse:latest-arm64v8
|
|
|
|
docker push asonix/synapse:latest
|