Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
tuanta committed Jun 7, 2022
0 parents commit 40423b9
Show file tree
Hide file tree
Showing 3 changed files with 749 additions and 0 deletions.
43 changes: 43 additions & 0 deletions Dockerfile
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"]
Loading

0 comments on commit 40423b9

Please sign in to comment.