vaultwarden : image build only PostgreSQL (binary is 10MiB lighter)

This commit is contained in:
Gitouche 2023-08-10 22:26:20 +02:00
parent b832cf0f5d
commit 778ffdeda9

View file

@ -12,7 +12,11 @@ buildfolder=/tmp/vaultwarden-$$
if ! podman image exists ${vaultwarden_image}:${vaultwarden_version}; then
mkdir ${buildfolder} &&
if git clone --depth=1 --branch=${vaultwarden_version} https://github.com/dani-garcia/vaultwarden.git ${buildfolder}/ ; then
TMPDIR=${HOME} podman image build -t ${vaultwarden_image}:${vaultwarden_version} -f ${buildfolder}/docker/amd64/Dockerfile.alpine ${buildfolder} || retval=false
TMPDIR=${HOME} podman image build \
-t ${vaultwarden_image}:${vaultwarden_version} \
--build-arg DB=postgresql \
-f ${buildfolder}/docker/amd64/Dockerfile.alpine \
${buildfolder} || retval=false
fi
rm -rf ${buildfolder}
podman image prune -a -f --filter dangling=true