PLNK/Dockerfile

61 lines
1.4 KiB
Docker
Raw Permalink Normal View History

2022-08-28 00:41:44 -04:00
FROM debian:latest
## Upgrade packages on system
RUN apt-get update
## Install build tools
2022-09-09 15:06:45 -04:00
RUN apt-get install -y \
g++\
gcc\
make\
patch
2022-08-28 00:41:44 -04:00
## Install package dependencies
RUN apt-get install -y \
curl\
libc-dev\
libcurl4-openssl-dev\
libedit-dev\
libjansson-dev\
libogg-dev\
libresample1-dev\
libspeex-dev\
libsqlite3-dev\
libsrtp2-dev\
libssl-dev\
libvorbis-dev\
libxml2-dev\
libxslt-dev\
ncurses-dev\
uuid-dev
## Install GONK specific dependencies
RUN apt-get install -y fail2ban iptables net-tools cron
2022-08-28 00:41:44 -04:00
2022-09-10 23:56:19 -04:00
## Copy over source and other scripts
COPY resources /build
2022-08-28 00:41:44 -04:00
## Move and unpack source to /build
RUN mkdir /build/asterisk-current
RUN tar -xzf /build/asterisk-current.tar.gz --strip-components 1 -C /build/asterisk-current
RUN rm /build/asterisk-current.tar.gz
## Configure asterisk source for build
WORKDIR /build/asterisk-current
RUN ./configure
RUN mv /build/menuselect.makeopts /build/asterisk-current/
RUN make -j$(cat /proc/cpuinfo | grep processor | wc -l)
RUN make install
## Cleanup
WORKDIR /
2022-09-12 13:41:03 -04:00
RUN cp /build/reload.sh /usr/bin/reload
RUN chmod +x /usr/bin/reload
2022-08-28 00:41:44 -04:00
RUN cp /build/gonk.sh /usr/bin/gonk
RUN chmod +x /usr/bin/gonk
RUN rm -rf /build
RUN apt-get remove -y --purge g++ gcc make patch
2022-09-10 23:56:19 -04:00
RUN apt-get autoremove -y && apt-get clean -y && apt-get autoclean -y
2022-08-28 00:41:44 -04:00
ENTRYPOINT [ "gonk" ]