andrius-asterisk/build.sh

13 lines
422 B
Bash
Raw Normal View History

#!/bin/sh
TAG=$1
cd ${TAG} && \
2023-01-18 21:00:32 +08:00
docker build --pull --force-rm -t onenetcom/asterisk:${TAG} --file ./Dockerfile . && \
docker run -d --rm --name asterisk-${TAG} onenetcom/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 ..