aboutsummaryrefslogblamecommitdiffstats
path: root/scripts/build-docker-otp
blob: 928b84a32d3fbe29f6f02a2fedc44317e2e316c0 (plain) (tree)
1
2
3
4
5
6
7
8
9


                     
                                            



          
     



                                                          
                                                                         
#!/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+"$@"}