aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/build-docker-otp
blob: 928b84a32d3fbe29f6f02a2fedc44317e2e316c0 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/bin/bash

if [ $# -lt 1 ]; then
    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 ${1+"$@"}