2022-08-16 19:04:49 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
ABSDIR="$( dirname "$(readlink -f -- "$0")" )"
|
2023-07-29 07:14:59 +00:00
|
|
|
source "${ABSDIR}"/../functions.sh
|
|
|
|
source "${ABSDIR}"/vars.sh
|
2022-08-16 19:04:49 +00:00
|
|
|
|
|
|
|
ensure_pwd_is_scriptdir
|
|
|
|
ensure_not_root
|
|
|
|
|
|
|
|
if ! podman image exists ${framadate_image}:${framadate_version}; then
|
2023-10-29 14:32:34 +00:00
|
|
|
TMPDIR=${HOME} podman image build \
|
2023-10-28 15:41:15 +00:00
|
|
|
-t "${framadate_image}":"${framadate_version}" \
|
|
|
|
--build-arg=version="${framadate_version}" \
|
|
|
|
container/ || retval=false
|
|
|
|
podman image prune -a -f --filter dangling=true
|
|
|
|
podman image prune -a -f --filter intermediate=true
|
|
|
|
podman image rm -f $(podman image list -a -q -- docker.io/library/php)
|
|
|
|
eval "$retval"
|
2022-08-16 19:06:37 +00:00
|
|
|
else
|
2022-08-16 19:04:49 +00:00
|
|
|
echo "Image ${framadate_image}:${framadate_version} already built"
|
2023-07-28 21:08:44 +00:00
|
|
|
fi &&
|
2022-08-16 19:04:49 +00:00
|
|
|
|
|
|
|
oci_push_to_registry ${framadate_image}:${framadate_version}
|