2018-09-22 18:44:45 +08:00
|
|
|
#!/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} && \
|
2018-09-22 18:44:45 +08:00
|
|
|
sleep 3 && \
|
2019-04-09 13:05:40 +08:00
|
|
|
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" ; \
|
2018-09-22 18:44:45 +08:00
|
|
|
docker stop asterisk-${TAG}; \
|
|
|
|
cd ..
|