2020-12-28 18:05:30 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
2021-04-14 17:38:21 +00:00
|
|
|
set -e
|
2020-12-28 18:05:30 +00:00
|
|
|
|
|
|
|
TAG="${1}"
|
|
|
|
BASE=$(echo ${TAG} | cut -d":" -f1)
|
2021-04-14 17:38:21 +00:00
|
|
|
FULL="${2}"
|
2020-12-28 18:05:30 +00:00
|
|
|
|
|
|
|
if [[ -z "${TAG}" ]]; then
|
2021-01-19 08:39:59 +00:00
|
|
|
echo "You must specify a container tag. ex: lalanza808/wownero:v0.9.2.1"
|
2020-12-28 18:05:30 +00:00
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2021-04-14 17:38:21 +00:00
|
|
|
if [[ -z "${FULL}" ]]
|
|
|
|
then
|
|
|
|
echo -e "[+] Building container by fetching binaries"
|
|
|
|
docker build -t "${TAG}" -f dockerfiles/wownerod_nocompile .
|
|
|
|
else
|
|
|
|
echo -e "[+] Building container by compiling binaries"
|
|
|
|
docker build -t "${TAG}" .
|
|
|
|
fi
|
2020-12-28 18:05:30 +00:00
|
|
|
|
|
|
|
docker tag "${TAG}" "${BASE}:latest"
|
|
|
|
|
|
|
|
docker push "${TAG}"
|
|
|
|
|
|
|
|
docker push "${BASE}:latest"
|