2022-11-15 18:16:59 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
ABSDIR="$( dirname "$(readlink -f -- "$0")" )"
|
|
|
|
source ${ABSDIR}/../functions.sh
|
|
|
|
source ${ABSDIR}/vars.sh
|
|
|
|
|
|
|
|
ensure_pwd_is_scriptdir
|
|
|
|
ensure_not_root
|
|
|
|
|
|
|
|
if ! podman image exists ${ntfy_image}:${ntfy_version}; then
|
2022-11-18 11:12:29 +00:00
|
|
|
TMPDIR=${HOME} podman build -t "${ntfy_image}:${ntfy_version}" docker/ --build-arg NTFY_VERSION=${ntfy_version} || exit 1
|
2022-11-15 18:16:59 +00:00
|
|
|
podman image prune -a -f --filter dangling=true
|
|
|
|
podman image prune -a -f --filter intermediate=true
|
|
|
|
podman image rm -f $(podman images -a -q -- docker.io/library/golang)
|
|
|
|
podman image rm -f $(podman images -a -q -- docker.io/library/alpine)
|
|
|
|
else
|
|
|
|
echo "Image ${ntfy_image}:${ntfy_version} already built"
|
|
|
|
fi
|
|
|
|
|
|
|
|
oci_push_to_registry ${ntfy_image}:${ntfy_version}
|