Go to file
2022-05-16 17:15:40 +02:00
.act fetch-asterisk-releases and build workflows 2022-05-16 17:15:40 +02:00
.github fetch-asterisk-releases and build workflows 2022-05-16 17:15:40 +02:00
alpine fetch-asterisk-releases and build workflows 2022-05-16 17:15:40 +02:00
alpine-glibc Build apline images using GitHub workflow 2022-05-16 12:07:56 +02:00
centos Build apline images using GitHub workflow 2022-05-16 12:07:56 +02:00
debian Build apline images using GitHub workflow 2022-05-16 12:07:56 +02:00
tests make repository great again ;) 2022-02-21 23:08:00 +01:00
.gitignore Build apline images using GitHub workflow 2022-05-16 12:07:56 +02:00
asterisk-certified-releases.txt fetch-asterisk-releases and build workflows 2022-05-16 17:15:40 +02:00
asterisk-releases.txt fetch-asterisk-releases and build workflows 2022-05-16 17:15:40 +02:00
build-and-push.sh Early versions of asterisk: 1.2, 1.4 and 1.6, symlinks 2019-04-09 07:05:40 +02:00
build.sh Early versions of asterisk: 1.2, 1.4 and 1.6, symlinks 2019-04-09 07:05:40 +02:00
check-docker-hub.sh Updated tags, now it containing linux distributive, version and asterisk version 2018-09-22 12:44:45 +02:00
LICENSE Dockerfile 2016-05-10 14:16:03 +01:00
Makefile Build apline images using GitHub workflow 2022-05-16 12:07:56 +02:00
post_checkout.erb whole range of asterisk releases plus basic testing 2019-12-30 15:31:29 +01:00
post_push.erb whole range of asterisk releases plus basic testing 2019-12-30 15:31:29 +01:00
README.md Update README.md 2022-02-22 08:58:17 +01:00

Asterisk PBX Docker image

REFACTOR! I started massive refactor, considering comments received in the issues and private emails. Thank you all for the feedback! Once ready, This readme will be updated, right away please look to the existing docker tags on hub

The smallest Docker image with Asterisk PBX https://hub.docker.com/r/andrius/asterisk/

This image is based on Alpine Linux image, which is only a 5MB image, and contains Asterisk PBX.

Total size of this image for latest tag (based on Alpine linux) is:

And for debian-stretch-slim-15-current .

Custom UID/GID

By default, Asterisk will run as default user (asterisk) with UID and GID assigned by alpine linux, but it's possible to specify then through environment variables:

  • ASTERISK_UID
  • ASTERISK_GID (note, GID is not supported in debian releases)

Default asterisk user will be re-created with new UID and GID

In given example, ID's of current host user will be used to start, that will fix permissions issues on logs volume:

docker run -ti --rm \
  -e ASTERISK_UID=`id -u` \
  -e ASTERISK_GID=`id -g` \
  -v ${PWD}/logs:/var/log/asterisk \
  andrius/asterisk

Alternative user

It is possible to specifty other than asterisk user to start through environment variable ASTERISK_USER:

docker run -ti --rm -e ASTERISK_USER=root andrius/asterisk

Versions

Based on Alpine linux:

  • docker pull andrius/asterisk:11.6.1 for Asterisk 11.x (stable release), Alpine 2.6
  • docker pull andrius/asterisk:11 for Asterisk 11.x (stable release), Alpine 2.7
  • docker pull andrius/asterisk:14 for Asterisk 14.x, Alpine 3.6
  • docker pull andrius/asterisk:15.2.2 for Asterisk 15.2.2, Alpine 3.7
  • docker pull andrius/asterisk:15 for Asterisk 15.x, Alpine 3.8
  • docker pull andrius/asterisk:latest for Asterisk 15.x, Alpine latest
  • docker pull andrius/asterisk:edge for latest Asterisk 15.x, based on Alpine edge

What's missing

Only base Asterisk packages installed. If you want to add sounds, it's recommended to mount them as volume or data container, however you may install additional packages with apk command:

  • asterisk-alsa - ALSA channel;
  • asterisk-cdr-mysql - MySQL CDR;
  • asterisk-chan-dongle - chan_dongle, to manage calls and SMS through Huawei USB dongle;
  • asterisk-curl - curl integration with Asterisk;
  • asterisk-dahdi - DAHDI channel (ISDN BRI/PRI, FXO and FXS cards integration);
  • asterisk-fax - support faxing
  • asterisk-mobile - Use Bluetooth mobile phones as FXO devices;
  • asterisk-odbc - ODBC support;
  • asterisk-pgsql - PostgreSQL support;
  • asterisk-sounds-en - sounds
  • asterisk-sounds-moh - music on hold;
  • asterisk-speex - Speex codec;
  • asterisk-srtp - SRTP encryption;
  • asterisk-tds - MS SQL support.

Database support

By default, Asterisk PBX store CDR's to the CSV file, but also support databases. Refer Asterisk PBX documentation for ODBC support.

For Postgre SQL include following lines to your Dockerfile:

RUN apk add --update less psqlodbc asterisk-odbc asterisk-pgsql \
&&  rm -rf /var/cache/apk/*

And For MySQL:

For MySQL, mysql-connector-odbc should be downloaded from the official site and compiled

Based on Debian linux:

Debian Jessie:

  • docker pull andrius/asterisk:debian-11.25.3
  • docker pull andrius/asterisk:debian-12.8.2

Debian Stretch:

  • docker pull andrius/asterisk:debian-13-current
  • docker pull andrius/asterisk:debian-14-current
  • docker pull andrius/asterisk:debian-15-current