aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xscripts/build-docker-otp5
1 files changed, 3 insertions, 2 deletions
diff --git a/scripts/build-docker-otp b/scripts/build-docker-otp
index d796759691..928b84a32d 100755
--- a/scripts/build-docker-otp
+++ b/scripts/build-docker-otp
@@ -1,13 +1,14 @@
#!/bin/bash
if [ $# -lt 1 ]; then
- echo "Usage $0 32|64 [command]"
+ echo "Usage $0 32|64 [command] [arg]..."
exit 1
fi
ARCH="$1"
+shift
git archive --format=tar.gz --prefix=otp/ HEAD >otp.tar.gz
docker build -t otp --file scripts/Dockerfile.$ARCH .
-docker run --volume="$PWD/logs:/buildroot/otp/logs" -i --rm otp $2
+docker run --volume="$PWD/logs:/buildroot/otp/logs" -i --rm otp ${1+"$@"}