-
Notifications
You must be signed in to change notification settings - Fork 4
/
appbld
executable file
·18 lines (16 loc) · 708 Bytes
/
appbld
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/usr/bin/env bash
# check docker image for building
if [ "$(docker images -q appnet-bld:4.1 2> /dev/null)" == "" ]; then
echo "Build Docker image as appnet-bld:4.1"
docker image build --rm --network host --compress -t appnet-bld:4.1 -f ./Dockerfile.bld .
fi
# execute commands
if [ $# -ne 0 ]; then
echo "$@ ..."
###docker run -v `pwd`:`pwd` -w `pwd` -i -t --rm --network host --env DEBUG=appnet.io.srv,appnet.io appnet-bld:4.1 $@
docker run -v `pwd`:`pwd` -w `pwd` -i -t --rm --network host appnet-bld:4.1 $@
else
echo "Start building ..."
docker run -v `pwd`:`pwd` -w `pwd` -i -t --rm --network host appnet-bld:4.1 \
bash -c "npm i --only=prod && ./tools/genSrvKey.bash 51dese.com"
fi