build image script : force TMPDIR

This commit is contained in:
Gitouche 2023-10-29 15:32:34 +01:00
parent 5591bbd302
commit 7abe53f656
4 changed files with 9 additions and 9 deletions

View file

@ -8,7 +8,7 @@ ensure_pwd_is_scriptdir
ensure_not_root ensure_not_root
if ! podman image exists ${framadate_image}:${framadate_version}; then if ! podman image exists ${framadate_image}:${framadate_version}; then
podman image build \ TMPDIR=${HOME} podman image build \
-t "${framadate_image}":"${framadate_version}" \ -t "${framadate_image}":"${framadate_version}" \
--build-arg=version="${framadate_version}" \ --build-arg=version="${framadate_version}" \
container/ || retval=false container/ || retval=false

View file

@ -12,11 +12,11 @@ buildfolder=/tmp/docker-jitsi-meet-$$
build_base() { build_base() {
podman image pull docker.io/library/debian:bullseye-slim podman image 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 image build -t localhost/jitsi/base:${version} ${buildfolder}/base/ && TMPDIR=${HOME} podman image build -t localhost/jitsi/base:${version} ${buildfolder}/base/ &&
podman image tag localhost/jitsi/base:${version} localhost/jitsi/base:latest || exit 255 podman image tag localhost/jitsi/base:${version} localhost/jitsi/base:latest || exit 255
fi fi
if ! podman image exists localhost/jitsi/base-java:${version}; then if ! podman image exists localhost/jitsi/base-java:${version}; then
podman image build -t localhost/jitsi/base-java:${version} ${buildfolder}/base-java && TMPDIR=${HOME} 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 255 podman image tag localhost/jitsi/base-java:${version} localhost/jitsi/base-java:latest || exit 255
fi fi
base_cleanup=true base_cleanup=true
@ -26,19 +26,19 @@ mkdir ${buildfolder} &&
if curl -sSfL -- "https://github.com/jitsi/docker-jitsi-meet/archive/refs/tags/${version}.tar.gz" | tar xz --strip-components 1 -C ${buildfolder}/ ; then if curl -sSfL -- "https://github.com/jitsi/docker-jitsi-meet/archive/refs/tags/${version}.tar.gz" | tar xz --strip-components 1 -C ${buildfolder}/ ; then
if ! podman image exists git.garbaye.fr/garbaye/jitsi-jvb:${version}; then if ! podman image exists git.garbaye.fr/garbaye/jitsi-jvb:${version}; then
build_base build_base
podman image build -t git.garbaye.fr/garbaye/jitsi-jvb:${version} ${buildfolder}/jvb/ || exit 255 TMPDIR=${HOME} podman image build -t git.garbaye.fr/garbaye/jitsi-jvb:${version} ${buildfolder}/jvb/ || exit 255
fi fi
if ! podman image exists git.garbaye.fr/garbaye/jitsi-jicofo:${version}; then if ! podman image exists git.garbaye.fr/garbaye/jitsi-jicofo:${version}; then
build_base build_base
podman image build -t git.garbaye.fr/garbaye/jitsi-jicofo:${version} ${buildfolder}/jicofo/ || exit 255 TMPDIR=${HOME} podman image build -t git.garbaye.fr/garbaye/jitsi-jicofo:${version} ${buildfolder}/jicofo/ || exit 255
fi fi
if ! podman image exists git.garbaye.fr/garbaye/jitsi-prosody:${version}; then if ! podman image exists git.garbaye.fr/garbaye/jitsi-prosody:${version}; then
build_base build_base
podman image build -t git.garbaye.fr/garbaye/jitsi-prosody:${version} ${buildfolder}/prosody/ || exit 255 TMPDIR=${HOME} podman image build -t git.garbaye.fr/garbaye/jitsi-prosody:${version} ${buildfolder}/prosody/ || exit 255
fi fi
if ! podman image exists git.garbaye.fr/garbaye/jitsi-web:${version}; then if ! podman image exists git.garbaye.fr/garbaye/jitsi-web:${version}; then
build_base build_base
podman image build -t git.garbaye.fr/garbaye/jitsi-web:${version} ${buildfolder}/web/ || exit 255 TMPDIR=${HOME} podman image build -t git.garbaye.fr/garbaye/jitsi-web:${version} ${buildfolder}/web/ || exit 255
fi fi
podman image prune -a -f --filter dangling=true podman image prune -a -f --filter dangling=true
podman image prune -a -f --filter intermediate=true podman image prune -a -f --filter intermediate=true

View file

@ -12,7 +12,7 @@ buildfolder=/tmp/privatebin-$$
if ! podman image exists ${privatebin_image}:${privatebin_version}; then if ! podman image exists ${privatebin_image}:${privatebin_version}; then
if git clone -b ${privatebin_version} --depth=1 https://github.com/PrivateBin/docker-nginx-fpm-alpine ${buildfolder} ; then if git clone -b ${privatebin_version} --depth=1 https://github.com/PrivateBin/docker-nginx-fpm-alpine ${buildfolder} ; then
sed -i "s#mv cfg lib tpl vendor /srv#mv cfg lib tpl vendor /srv \&\& sed -i \\'/Content-Security-Policy\\\|X-XSS-Protection\\\|X-Frame-Options\\\|X-Content-Type-Options/d\\' /srv/lib/Controller.php#" ${buildfolder}/Dockerfile && sed -i "s#mv cfg lib tpl vendor /srv#mv cfg lib tpl vendor /srv \&\& sed -i \\'/Content-Security-Policy\\\|X-XSS-Protection\\\|X-Frame-Options\\\|X-Content-Type-Options/d\\' /srv/lib/Controller.php#" ${buildfolder}/Dockerfile &&
podman image build \ TMPDIR=${HOME} podman image build \
-t "${privatebin_image}":"${privatebin_version}" \ -t "${privatebin_image}":"${privatebin_version}" \
${buildfolder} || retval=false ${buildfolder} || retval=false
podman image prune -a -f --filter dangling=true podman image prune -a -f --filter dangling=true

View file

@ -18,7 +18,7 @@ if ! podman image exists ${seafile_image}:${seafile_release}; then
sed_in_place " -i https://pypi.tuna.tsinghua.edu.cn/simple/" " " ${buildfolder}/image/seafile_${seafile_release%.*}/Dockerfile && sed_in_place " -i https://pypi.tuna.tsinghua.edu.cn/simple/" " " ${buildfolder}/image/seafile_${seafile_release%.*}/Dockerfile &&
sed_in_place 'wget https://seafile-downloads.oss-cn-shanghai.aliyuncs.com' 'wget -q https://download.seadrive.org' ${buildfolder}/image/seafile_${seafile_release%.*}/Dockerfile && sed_in_place 'wget https://seafile-downloads.oss-cn-shanghai.aliyuncs.com' 'wget -q https://download.seadrive.org' ${buildfolder}/image/seafile_${seafile_release%.*}/Dockerfile &&
sed_in_place 'tar -zxvf' 'tar -zxf' ${buildfolder}/image/seafile_${seafile_release%.*}/Dockerfile && sed_in_place 'tar -zxvf' 'tar -zxf' ${buildfolder}/image/seafile_${seafile_release%.*}/Dockerfile &&
podman image build \ TMPDIR=${HOME} podman image build \
-t ${seafile_image}:${seafile_release} \ -t ${seafile_image}:${seafile_release} \
-f ${buildfolder}/image/seafile_${seafile_release%.*}/Dockerfile \ -f ${buildfolder}/image/seafile_${seafile_release%.*}/Dockerfile \
${buildfolder} || retval=false ${buildfolder} || retval=false