dangerzone/install/macos/build-image.sh
Alex Pyrgiotis 624d480cca
install: Do not create intermediate tarfile for container
Skip the creation of the `share/container.tar` file, since it's not used
anywhere. Instead, pipe our `docker/podman save` invocations to `gzip`
directly, which will compress the tarfile on the fly. This saves both
time and disk space.
2023-01-16 18:48:08 +02:00

10 lines
404 B
Bash
Executable file

#!/bin/sh
echo "Building container image"
docker build container --platform linux/amd64 --tag dangerzone.rocks/dangerzone
echo "Saving and compressing container image"
docker save dangerzone.rocks/dangerzone | gzip > share/container.tar.gz
echo "Looking up the image id"
docker image ls dangerzone.rocks/dangerzone | grep "dangerzone.rocks/dangerzone" | tr -s ' ' | cut -d' ' -f3 > share/image-id.txt