39 lines
1.8 KiB
Bash
Executable file
39 lines
1.8 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-$$
|
|
|
|
mkdir ${buildfolder} &&
|
|
curl -sSfL -- "https://github.com/jitsi/docker-jitsi-meet/archive/refs/tags/${version}.tar.gz" | tar xz --strip-components 1 -C ${buildfolder}/ && {
|
|
podman pull docker.io/library/debian:bullseye-slim
|
|
if ! podman image exists localhost/jitsi/base:${version}; then
|
|
podman 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 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
|
|
if ! podman image exists localhost/jitsi/jvb:${version}; then
|
|
podman build -t localhost/jitsi/jvb:${version} ${buildfolder}/jvb/ || exit -1
|
|
fi
|
|
if ! podman image exists localhost/jitsi/jicofo:${version}; then
|
|
podman build -t localhost/jitsi/jicofo:${version} ${buildfolder}/jicofo/ || exit -1
|
|
fi
|
|
if ! podman image exists localhost/jitsi/prosody:${version}; then
|
|
podman build -t localhost/jitsi/prosody:${version} ${buildfolder}/prosody/ || exit -1
|
|
fi
|
|
if ! podman image exists localhost/jitsi/web:${version}; then
|
|
podman build -t localhost/jitsi/web:${version} ${buildfolder}/web/ || exit -1
|
|
podman rmi -f $(podman images -f "dangling=true" -q)
|
|
fi
|
|
podman rmi localhost/jitsi/base-java:${version} localhost/jitsi/base-java:latest
|
|
podman rmi localhost/jitsi/base:${version} localhost/jitsi/base:latest
|
|
} ; rm -rf ${buildfolder}
|