1
0
Fork 0
This repository has been archived on 2023-10-09. You can view files and clone it, but cannot push or open issues or pull requests.
exa-docker-build/build-in-container.sh

31 lines
456 B
Bash
Executable File

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