simple asterisk build for docker image, version 20-latest
This commit is contained in:
25
20-debian/asterisk-build.sh
Executable file
25
20-debian/asterisk-build.sh
Executable file
@@ -0,0 +1,25 @@
|
||||
#!/bin/bash
|
||||
|
||||
apt-get -y install build-essential libssl-dev libedit-dev uuid-dev libxml2-dev libsqlite3-dev
|
||||
|
||||
cd /usr/src
|
||||
curl -L http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-20-current.tar.gz > asterisk.tar.gz
|
||||
tar zxf asterisk.tar.gz
|
||||
cd asterisk-20.*
|
||||
# set compiler flags for cross system compatibility
|
||||
export ASTCFLAGS="-g -O2 -march=x86-64 -fstack-protector-strong -Wformat -Werror=format-security"
|
||||
# configure to use the bundled jansson libs (less dependancy on base image)
|
||||
./configure --with-jansson-bundled
|
||||
make
|
||||
make install
|
||||
make samples
|
||||
|
||||
cd /usr/src
|
||||
rm -rf *
|
||||
|
||||
apt-get -y purge build-essential
|
||||
apt -y autoremove
|
||||
|
||||
adduser --system --home /var/lib/asterisk --shell /sbin/nologin --group asterisk
|
||||
chown -R asterisk:asterisk /var/lib/asterisk
|
||||
|
||||
Reference in New Issue
Block a user