PLNK/Dockerfile

53 lines
1.2 KiB
Docker
Raw Normal View History

2022-08-28 00:41:44 -04:00
FROM debian:latest
COPY resources /build
## Upgrade packages on system
RUN apt-get update
## Install build tools
RUN apt-get install -y g++ gcc make patch
## 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
## 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 /
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
ENTRYPOINT [ "gonk" ]