35 lines
527 B
Bash
Executable File
35 lines
527 B
Bash
Executable File
#!/bin/bash
|
|
|
|
set -eu
|
|
|
|
TARGET="$(dirname "$0" | xargs realpath)"
|
|
VERSION="3.4.2"
|
|
IMAGE="debian:bookworm"
|
|
|
|
while getopts "v:i:h" opt
|
|
do
|
|
case "$opt" in
|
|
v)
|
|
VERSION="$OPTARG"
|
|
;;
|
|
i)
|
|
IMAGE="$OPTARG"
|
|
;;
|
|
h)
|
|
echo "Usage: $0 [-i image] [-v version]"
|
|
exit 0
|
|
;;
|
|
*)
|
|
exit 1
|
|
;;
|
|
esac
|
|
done
|
|
|
|
docker run --rm \
|
|
--name vault-build-$$ \
|
|
-v "$TARGET:/target" \
|
|
-w /target \
|
|
--user root \
|
|
"$IMAGE" \
|
|
sh build.sh
|