From 82d17042bab23b4f9b1948794670d20ddb14d0ba Mon Sep 17 00:00:00 2001 From: Jamie Sinclair Date: Sun, 7 Jan 2024 14:13:02 +0900 Subject: [PATCH] add docker build script for rust codecs --- tools/build-rust.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100755 tools/build-rust.sh diff --git a/tools/build-rust.sh b/tools/build-rust.sh new file mode 100755 index 0000000..543ce5f --- /dev/null +++ b/tools/build-rust.sh @@ -0,0 +1,10 @@ +set -e + +if [ ! -z "$RUST_IMG" ] +then + # Get part after ":" (https://stackoverflow.com/a/15149278/439965). + IMG_SUFFIX=-${RUST_IMG#*:} +fi +IMG_NAME=squoosh-rust$IMG_SUFFIX +docker build -t $IMG_NAME --build-arg RUST_IMG - < ../rust.Dockerfile +docker run -it --rm -v $PWD:/src $IMG_NAME "$@"