-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
33 lines (25 loc) · 1.04 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
FROM alpine:latest
MAINTAINER Keith Rose <me@keithro.se>
# Based on https://github.com/andrius/asterisk/alpine-latest
RUN apk add --update asterisk asterisk-sample-config \
&& asterisk -U asterisk \
&& sleep 5 \
&& pkill -9 asterisk \
&& pkill -9 astcanary \
&& sleep 2 \
&& rm -rf /var/run/asterisk/* \
&& mkdir -p /var/spool/asterisk/fax \
&& chown -R asterisk: /var/spool/asterisk/fax \
&& truncate -s 0 /var/log/asterisk/messages \
/var/log/asterisk/queue_log \
&& rm -rf /var/cache/apk/* \
/tmp/* \
/var/tmp/* \
&& mkdir -p /etc/asterisk/ \
&& chown asterisk.asterisk /etc/asterisk
COPY configs/ /etc/asterisk/
COPY configs/pjsip.d/* /etc/asterisk/pjsip.d/
ADD entrypoint.sh /entrypoint.sh
RUN chmod 777 /entrypoint.sh && chmod +x /entrypoint.sh
EXPOSE 5060/udp 5060/tcp
ENTRYPOINT ["/entrypoint.sh"]