Merge pull request #1245 from sergey-safarov/alpine
[sip-router] / pkg / kamailio / alpine_docker / hooks / pre_build
1 #!/bin/bash -e
2
3 echo "=> Build Kamailio source code"
4
5 if [ ! -z "$SOURCE_BRANCH" ];then
6     ENV_OPT="-e SOURCE_BRANCH=$SOURCE_BRANCH"
7 fi
8
9 if [ ! -z "$GIT_TAG" ];then
10     ENV_OPT="$ENV_OPT -e GIT_TAG=$GIT_TAG"
11 fi
12
13 docker run --volume=`pwd`/../../..:/usr/src/kamailio --volume=`pwd`/build.sh:/build.sh --entrypoint=/build.sh $ENV_OPT alpine:edge
14 exit $?