mirror of
https://github.com/freedomofpress/dangerzone.git
synced 2025-05-04 20:51:49 +02:00
25 lines
587 B
Bash
Executable file
25 lines
587 B
Bash
Executable file
#!/bin/sh
|
|
|
|
set -euo pipefail
|
|
|
|
TAG=dangerzone.rocks/dangerzone:latest
|
|
|
|
container_runtime() {
|
|
if hash podman &>/dev/null; then
|
|
podman "$@"
|
|
elif hash docker &>/dev/null; then
|
|
docker "$@"
|
|
else
|
|
echo 'No container runtime installed.' >&2
|
|
exit 1
|
|
fi
|
|
}
|
|
|
|
echo "Building container image" >&2
|
|
container_runtime build --pull dangerzone/ -f Dockerfile --tag "$TAG"
|
|
|
|
echo "Saving and compressing container image" >&2
|
|
container_runtime save "$TAG" | gzip > share/container.tar.gz
|
|
|
|
echo "Looking up the image id" >&2
|
|
container_runtime images -q --filter=reference="$TAG" > share/image-id.txt
|