Jitsi / Matrix : use /tmp buildfolder to uncompress archive
This commit is contained in:
parent
bf8f3f460a
commit
1c3f97a7e9
|
@ -7,30 +7,32 @@ source ${ABSDIR}/vars.sh
|
||||||
ensure_pwd_is_scriptdir
|
ensure_pwd_is_scriptdir
|
||||||
ensure_not_root
|
ensure_not_root
|
||||||
|
|
||||||
mkdir docker-jitsi-meet &&
|
buildfolder=/tmp/docker-jitsi-meet-$$
|
||||||
curl -s -- "https://codeload.github.com/jitsi/docker-jitsi-meet/tar.gz/refs/tags/${version}" | tar xz --strip-components 1 -C docker-jitsi-meet/ && {
|
|
||||||
|
mkdir ${buildfolder} &&
|
||||||
|
curl -s -- "https://codeload.github.com/jitsi/docker-jitsi-meet/tar.gz/refs/tags/${version}" | tar xz --strip-components 1 -C ${buildfolder}/ && {
|
||||||
podman pull docker.io/library/debian:bullseye-slim
|
podman pull docker.io/library/debian:bullseye-slim
|
||||||
if ! podman image exists localhost/jitsi/base:${version}; then
|
if ! podman image exists localhost/jitsi/base:${version}; then
|
||||||
podman build -t localhost/jitsi/base:${version} docker-jitsi-meet/base/ &&
|
podman build -t localhost/jitsi/base:${version} ${buildfolder}/base/ &&
|
||||||
podman image tag localhost/jitsi/base:${version} localhost/jitsi/base:latest || exit -1
|
podman image tag localhost/jitsi/base:${version} localhost/jitsi/base:latest || exit -1
|
||||||
fi
|
fi
|
||||||
if ! podman image exists localhost/jitsi/base-java:${version}; then
|
if ! podman image exists localhost/jitsi/base-java:${version}; then
|
||||||
podman build -t localhost/jitsi/base-java:${version} docker-jitsi-meet/base-java &&
|
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
|
podman image tag localhost/jitsi/base-java:${version} localhost/jitsi/base-java:latest || exit -1
|
||||||
fi
|
fi
|
||||||
if ! podman image exists localhost/jitsi/jvb:${version}; then
|
if ! podman image exists localhost/jitsi/jvb:${version}; then
|
||||||
podman build -t localhost/jitsi/jvb:${version} docker-jitsi-meet/jvb/ || exit -1
|
podman build -t localhost/jitsi/jvb:${version} ${buildfolder}/jvb/ || exit -1
|
||||||
fi
|
fi
|
||||||
if ! podman image exists localhost/jitsi/jicofo:${version}; then
|
if ! podman image exists localhost/jitsi/jicofo:${version}; then
|
||||||
podman build -t localhost/jitsi/jicofo:${version} docker-jitsi-meet/jicofo/ || exit -1
|
podman build -t localhost/jitsi/jicofo:${version} ${buildfolder}/jicofo/ || exit -1
|
||||||
fi
|
fi
|
||||||
if ! podman image exists localhost/jitsi/prosody:${version}; then
|
if ! podman image exists localhost/jitsi/prosody:${version}; then
|
||||||
podman build -t localhost/jitsi/prosody:${version} docker-jitsi-meet/prosody/ || exit -1
|
podman build -t localhost/jitsi/prosody:${version} ${buildfolder}/prosody/ || exit -1
|
||||||
fi
|
fi
|
||||||
if ! podman image exists localhost/jitsi/web:${version}; then
|
if ! podman image exists localhost/jitsi/web:${version}; then
|
||||||
podman build -t localhost/jitsi/web:${version} docker-jitsi-meet/web/ || exit -1
|
podman build -t localhost/jitsi/web:${version} ${buildfolder}/web/ || exit -1
|
||||||
podman rmi -f $(podman images -f "dangling=true" -q)
|
podman rmi -f $(podman images -f "dangling=true" -q)
|
||||||
fi
|
fi
|
||||||
podman rmi localhost/jitsi/base-java:${version} localhost/jitsi/base-java:latest
|
podman rmi localhost/jitsi/base-java:${version} localhost/jitsi/base-java:latest
|
||||||
podman rmi localhost/jitsi/base:${version} localhost/jitsi/base:latest
|
podman rmi localhost/jitsi/base:${version} localhost/jitsi/base:latest
|
||||||
} ; rm -rf docker-jitsi-meet
|
} ; rm -rf ${buildfolder}
|
||||||
|
|
|
@ -7,16 +7,18 @@ source ${ABSDIR}/vars.sh
|
||||||
ensure_pwd_is_scriptdir
|
ensure_pwd_is_scriptdir
|
||||||
ensure_not_root
|
ensure_not_root
|
||||||
|
|
||||||
|
buildfolder=/tmp/synapse-$$
|
||||||
|
|
||||||
if ! podman image exists localhost/matrixdotorg/synapse:${synapse_version}; then
|
if ! podman image exists localhost/matrixdotorg/synapse:${synapse_version}; then
|
||||||
mkdir synapse &&
|
mkdir ${buildfolder} &&
|
||||||
curl -s -- "https://codeload.github.com/matrix-org/synapse/tar.gz/refs/tags/${synapse_version}" | \tar xz --strip-components 1 -C synapse/ && {
|
curl -s -- "https://codeload.github.com/matrix-org/synapse/tar.gz/refs/tags/${synapse_version}" | \tar xz --strip-components 1 -C ${buildfolder}/ && {
|
||||||
podman run -d --name buildkitd --privileged docker.io/moby/buildkit:latest &&
|
podman run -d --name buildkitd --privileged docker.io/moby/buildkit:latest &&
|
||||||
curl -sSLf https://github.com/moby/buildkit/releases/download/v0.9.3/buildkit-v0.9.3.linux-amd64.tar.gz | \
|
curl -sSLf https://github.com/moby/buildkit/releases/download/v0.9.3/buildkit-v0.9.3.linux-amd64.tar.gz | \
|
||||||
tar xz -C ~/ bin/buildctl &&
|
tar xz -C ~/ bin/buildctl &&
|
||||||
~/bin/buildctl --addr=podman-container://buildkitd build \
|
~/bin/buildctl --addr=podman-container://buildkitd build \
|
||||||
--frontend dockerfile.v0 \
|
--frontend dockerfile.v0 \
|
||||||
--local context=synapse/ \
|
--local context=${buildfolder}/ \
|
||||||
--local dockerfile=synapse/docker/ \
|
--local dockerfile=${buildfolder}/docker/ \
|
||||||
--output type=tar | \
|
--output type=tar | \
|
||||||
podman import --change 'EXPOSE 8008/tcp' \
|
podman import --change 'EXPOSE 8008/tcp' \
|
||||||
--change 'EXPOSE 8009/tcp' \
|
--change 'EXPOSE 8009/tcp' \
|
||||||
|
@ -26,5 +28,5 @@ if ! podman image exists localhost/matrixdotorg/synapse:${synapse_version}; then
|
||||||
podman rmi docker.io/moby/buildkit:latest &&
|
podman rmi docker.io/moby/buildkit:latest &&
|
||||||
rm -f ~/bin/buildctl
|
rm -f ~/bin/buildctl
|
||||||
}
|
}
|
||||||
rm -rf synapse
|
rm -rf ${buildfolder}
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -10,7 +10,7 @@ ensure_not_root
|
||||||
buildfolder=/tmp/peerjs-server-$$
|
buildfolder=/tmp/peerjs-server-$$
|
||||||
|
|
||||||
if ! podman image exists ${upstream_images}:${version}; then
|
if ! podman image exists ${upstream_images}:${version}; then
|
||||||
mkdir -p ${buildfolder} &&
|
mkdir ${buildfolder} &&
|
||||||
curl -sSfL -- "https://github.com/peers/peerjs-server/archive/refs/tags/v${version}.tar.gz" | \tar xz --strip-components 1 -C ${buildfolder}/ &&
|
curl -sSfL -- "https://github.com/peers/peerjs-server/archive/refs/tags/v${version}.tar.gz" | \tar xz --strip-components 1 -C ${buildfolder}/ &&
|
||||||
sed_in_place "^FROM node:alpine" "FROM docker.io/library/node:alpine" ${buildfolder}/Dockerfile
|
sed_in_place "^FROM node:alpine" "FROM docker.io/library/node:alpine" ${buildfolder}/Dockerfile
|
||||||
podman build -t ${upstream_images}:${version} ${buildfolder}/
|
podman build -t ${upstream_images}:${version} ${buildfolder}/
|
||||||
|
|
Loading…
Reference in a new issue