-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 40423b9
Showing
3 changed files
with
749 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
FROM alpine:latest | ||
LABEL maintainer="Truong Anh Tuan <[email protected]>" | ||
|
||
ENV LANG=C.UTF-8 | ||
ENV LC_ALL C.UTF-8 | ||
|
||
RUN set -e \ | ||
&& apk add --update --quiet \ | ||
asterisk \ | ||
asterisk-alsa \ | ||
asterisk-cdr-mysql \ | ||
asterisk-curl \ | ||
asterisk-sounds-en \ | ||
asterisk-sounds-moh \ | ||
asterisk-speex \ | ||
asterisk-srtp \ | ||
asterisk-openrc \ | ||
asterisk-opus \ | ||
mysql \ | ||
asterisk-sample-config >/dev/null \ | ||
&& asterisk -U asterisk &>/dev/null \ | ||
&& sleep 5s \ | ||
&& [ "$(asterisk -rx "core show channeltypes" | grep PJSIP)" != "" ] && : \ | ||
|| rm -rf /usr/lib/asterisk/modules/*pj* \ | ||
&& pkill -9 ast \ | ||
&& sleep 1s \ | ||
&& truncate -s 0 \ | ||
/var/log/asterisk/messages \ | ||
/var/log/asterisk/queue_log || : \ | ||
&& mkdir -p /var/spool/asterisk/fax \ | ||
&& chown -R asterisk: /var/spool/asterisk \ | ||
&& rm -rf /var/run/asterisk/* \ | ||
/var/cache/apk/* \ | ||
/tmp/* \ | ||
/var/tmp/* | ||
|
||
EXPOSE 5060/udp 5060/tcp | ||
VOLUME /var/lib/asterisk/sounds /var/lib/asterisk/keys /var/lib/asterisk/phoneprov /var/spool/asterisk /var/log/asterisk | ||
|
||
ADD docker-entrypoint.sh /docker-entrypoint.sh | ||
RUN chmod +x /docker-entrypoint.sh | ||
|
||
ENTRYPOINT ["/docker-entrypoint.sh"] |
Oops, something went wrong.