andrius-asterisk/build.sh
2019-04-09 07:05:40 +02:00

13 lines
418 B
Bash
Executable File

#!/bin/sh
TAG=$1
cd ${TAG} && \
docker build --pull --force-rm -t andrius/asterisk:${TAG} --file ./Dockerfile . && \
docker run -d --rm --name asterisk-${TAG} andrius/asterisk:${TAG} && \
sleep 3 && \
docker exec -ti asterisk-${TAG} sh -c 'cat /etc/iss*' && \
docker exec -ti asterisk-${TAG} sh -c 'asterisk -rx "core show version"; exit $?' && echo "ok $?" || echo "not ok" ; \
docker stop asterisk-${TAG}; \
cd ..