57 lines
2.5 KiB
Bash
Executable file
57 lines
2.5 KiB
Bash
Executable file
#!/usr/bin/env bash
|
|
|
|
ABSDIR="$( dirname "$(readlink -f -- "$0")" )"
|
|
source ${ABSDIR}/../functions.sh
|
|
source ${ABSDIR}/vars.sh
|
|
|
|
ensure_pwd_is_scriptdir
|
|
ensure_not_root
|
|
|
|
buildfolder=/tmp/docker-jitsi-meet-$$
|
|
|
|
build_base() {
|
|
podman image pull docker.io/library/debian:bullseye-slim
|
|
if ! podman image exists localhost/jitsi/base:${version}; then
|
|
podman image build -t localhost/jitsi/base:${version} ${buildfolder}/base/ &&
|
|
podman image tag localhost/jitsi/base:${version} localhost/jitsi/base:latest || exit -1
|
|
fi
|
|
if ! podman image exists localhost/jitsi/base-java:${version}; then
|
|
podman image build -t localhost/jitsi/base-java:${version} ${buildfolder}/base-java &&
|
|
podman image tag localhost/jitsi/base-java:${version} localhost/jitsi/base-java:latest || exit -1
|
|
fi
|
|
base_cleanup=true
|
|
}
|
|
|
|
mkdir ${buildfolder} &&
|
|
curl -sSfL -- "https://github.com/jitsi/docker-jitsi-meet/archive/refs/tags/${version}.tar.gz" | tar xz --strip-components 1 -C ${buildfolder}/ && {
|
|
if ! podman image exists git.garbaye.fr/garbaye/jitsi-jvb:${version}; then
|
|
build_base
|
|
podman image build -t git.garbaye.fr/garbaye/jitsi-jvb:${version} ${buildfolder}/jvb/ || exit -1
|
|
fi
|
|
if ! podman image exists git.garbaye.fr/garbaye/jitsi-jicofo:${version}; then
|
|
build_base
|
|
podman image build -t git.garbaye.fr/garbaye/jitsi-jicofo:${version} ${buildfolder}/jicofo/ || exit -1
|
|
fi
|
|
if ! podman image exists git.garbaye.fr/garbaye/jitsi-prosody:${version}; then
|
|
build_base
|
|
podman image build -t git.garbaye.fr/garbaye/jitsi-prosody:${version} ${buildfolder}/prosody/ || exit -1
|
|
fi
|
|
if ! podman image exists git.garbaye.fr/garbaye/jitsi-web:${version}; then
|
|
build_base
|
|
# Fix for aardvark-dns < 1.2.0
|
|
# cf. https://git.garbaye.fr/Garbaye/services-garbaye/issues/7
|
|
sed_in_place "resolver {{ .Env.NGINX_RESOLVER }};" "resolver {{ .Env.NGINX_RESOLVER }} ipv6=off;" ${buildfolder}/web/rootfs/defaults/nginx.conf
|
|
podman image build -t git.garbaye.fr/garbaye/jitsi-web:${version} ${buildfolder}/web/ || exit -1
|
|
fi
|
|
dangling_images=$(podman image list -f "dangling=true" -q)
|
|
[ ! -z "${dangling_images}" ] && podman image rm -f ${dangling_images}
|
|
if [ ! -z ${base_cleanup} ] ; then
|
|
podman image rm localhost/jitsi/base-java:${version} localhost/jitsi/base-java:latest
|
|
podman image rm localhost/jitsi/base:${version} localhost/jitsi/base:latest
|
|
fi
|
|
} ; rm -rf ${buildfolder}
|
|
|
|
for image in ${upstream_images}; do
|
|
oci_push_to_registry ${image}:${version}
|
|
done
|