1
0
mirror of https://github.com/trezor/trezor-wallet synced 2024-11-13 20:08:56 +00:00
trezor-wallet/scripts/docker-build.sh

17 lines
649 B
Bash
Raw Normal View History

2018-10-02 13:43:03 +00:00
#!/bin/bash
cd "$(dirname "$0")"
2018-10-24 15:18:28 +00:00
if [[ "$1" == "dev" || "$1" == 'beta' || "$1" == 'prod' ]]
then
mkdir -p ../build
rm -rf ../build/$1
docker ps -q --filter "name=trezor-wallet" | grep -q . && docker stop trezor-wallet && docker rm -fv trezor-wallet
2018-10-24 15:18:28 +00:00
docker build -t trezor-wallet ../ --build-arg BUILD_TYPE=$1
docker run -p 8080:8080 -d --name trezor-wallet trezor-wallet:latest
docker cp trezor-wallet:/trezor-wallet-app/build/$1 ../build/$1
2018-10-24 15:18:28 +00:00
docker stop trezor-wallet
docker rm trezor-wallet
else
echo "invalid parameters... valid parameters are (beta, dev, prod)"
fi