2022-02-24 21:45:31 +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
|
|
|
|
|
2022-03-05 09:30:15 +00:00
|
|
|
buildfolder=/tmp/docker-jitsi-meet-$$
|
|
|
|
|
|
|
|
mkdir ${buildfolder} &&
|
2022-03-05 09:48:02 +00:00
|
|
|
curl -sSfL -- "https://github.com/jitsi/docker-jitsi-meet/archive/refs/tags/${version}.tar.gz" | tar xz --strip-components 1 -C ${buildfolder}/ && {
|
2022-02-24 21:45:31 +00:00
|
|
|
podman pull docker.io/library/debian:bullseye-slim
|
2022-02-25 09:04:04 +00:00
|
|
|
if ! podman image exists localhost/jitsi/base:${version}; then
|
2022-03-05 09:30:15 +00:00
|
|
|
podman build -t localhost/jitsi/base:${version} ${buildfolder}/base/ &&
|
2022-02-25 09:04:04 +00:00
|
|
|
podman image tag localhost/jitsi/base:${version} localhost/jitsi/base:latest || exit -1
|
|
|
|
fi
|
|
|
|
if ! podman image exists localhost/jitsi/base-java:${version}; then
|
2022-03-05 09:30:15 +00:00
|
|
|
podman build -t localhost/jitsi/base-java:${version} ${buildfolder}/base-java &&
|
2022-02-25 09:04:04 +00:00
|
|
|
podman image tag localhost/jitsi/base-java:${version} localhost/jitsi/base-java:latest || exit -1
|
|
|
|
fi
|
|
|
|
if ! podman image exists localhost/jitsi/jvb:${version}; then
|
2022-03-05 09:30:15 +00:00
|
|
|
podman build -t localhost/jitsi/jvb:${version} ${buildfolder}/jvb/ || exit -1
|
2022-02-25 09:04:04 +00:00
|
|
|
fi
|
|
|
|
if ! podman image exists localhost/jitsi/jicofo:${version}; then
|
2022-03-05 09:30:15 +00:00
|
|
|
podman build -t localhost/jitsi/jicofo:${version} ${buildfolder}/jicofo/ || exit -1
|
2022-02-25 09:04:04 +00:00
|
|
|
fi
|
|
|
|
if ! podman image exists localhost/jitsi/prosody:${version}; then
|
2022-03-05 09:30:15 +00:00
|
|
|
podman build -t localhost/jitsi/prosody:${version} ${buildfolder}/prosody/ || exit -1
|
2022-02-25 09:04:04 +00:00
|
|
|
fi
|
|
|
|
if ! podman image exists localhost/jitsi/web:${version}; then
|
2022-03-05 09:30:15 +00:00
|
|
|
podman build -t localhost/jitsi/web:${version} ${buildfolder}/web/ || exit -1
|
2022-02-24 21:45:31 +00:00
|
|
|
podman rmi -f $(podman images -f "dangling=true" -q)
|
2022-02-25 09:04:04 +00:00
|
|
|
fi
|
2022-02-25 09:23:10 +00:00
|
|
|
podman rmi localhost/jitsi/base-java:${version} localhost/jitsi/base-java:latest
|
|
|
|
podman rmi localhost/jitsi/base:${version} localhost/jitsi/base:latest
|
2022-03-05 09:30:15 +00:00
|
|
|
} ; rm -rf ${buildfolder}
|