master,master-alpine,master-alpine.debuglatest,latest-alpine,latest-alpine.debug6.x,6.x-alpine,6.x-alpine.debug5.x,5.x-alpine,5.x-alpine.debug
Tags master, latest, X.Y and X.Y.Z based on alpine image with removed all libs except libc, busybox, tcpdump, dumpcap, gawk, kamailio and dependent libs.
Tags that contains -alpine keyword based on alpine image. All OS tools is untouched and possible to use apk utility.
Tags that contains -alpine.debug keyword based on alpine image and includes gdb utility with kamailio debug files.
All images designed to run on host, bridge and swarm networks.
-
Where to get help:
the Kamailio maillist -
Where to file issues: Kamailio bug tracker
Kamailio is an Open Source SIP Server released under GPL, able to handle thousands of call setups per second. Kamailio can be used to build large platforms for VoIP and realtime communications – presence, WebRTC, Instant messaging and other applications.
Before first run need to prepare kamailio default config files. If you already have kamailio config files, then you can skip this. To prepare default config files need to execute
docker create --name kamailio kamailio/kamailio-ci
docker cp kamailio:/etc/kamailio /etc
docker rm kamailioThen you can start docker image
docker run --net=host --name kamailio \
-v /etc/kamailio:/etc/kamailio \
kamailio/kamailio-ci -m 64 -M 8You can use this systemd unit file on your docker host.
Unit file can be placed to /etc/systemd/system/kamailio-docker.service and enabled by commands
systemd start kamailio-docker.service
systemd enable kamailio-docker.serviceIf you use debug image, then need map host directory (or volume) to contianer /var/lib/coredump folder. This may be done using additinal docker run option -v /var/lib/coredump:/var/lib/coredump
[Unit]
Description=kamailio Container
After=docker.service network-online.target
Requires=docker.service
[Service]
Restart=always
TimeoutStartSec=0
#One ExecStart/ExecStop line to prevent hitting bugs in certain systemd versions
ExecStart=/bin/sh -c 'docker rm -f kamailio; \
docker run -t --rm=true --log-driver=none --name kamailio \
--net=host \
-v /etc/kamailio:/etc/kamailio \
kamailio/kamailio-ci'
ExecStop=/usr/bin/docker stop kamailio
[Install]
WantedBy=multi-user.target[Unit]
Description=kamailio Container
After=docker.service network-online.target
Requires=docker.service
[Service]
Restart=always
TimeoutStartSec=0
#One ExecStart/ExecStop line to prevent hitting bugs in certain systemd versions
ExecStart=/bin/sh -c 'docker rm -f kamailio; \
docker run -t --rm=true --log-driver=none --name kamailio \
--network bridge \
-p 5060:5060/udp -p 5060:5060 -p 5061:5061 \
--hostname kamailio \
-v /etc/kamailio:/etc/kamailio \
kamailio/kamailio-ci'
ExecStop=/usr/bin/docker stop kamailio
[Install]
WantedBy=multi-user.targetRequred to create user defined network first.
docker network create --driver bridge --subnet 10.0.0.0/24 my-netOr you can create swarm network
docker network create --driver overlay --attachable --subnet 10.0.0.0/24 my-netThen you can create systemd unit file
[Unit]
Description=kamailio Container
After=docker.service network-online.target
Requires=docker.service
[Service]
Restart=always
TimeoutStartSec=0
#One ExecStart/ExecStop line to prevent hitting bugs in certain systemd versions
ExecStart=/bin/sh -c 'docker rm -f kamailio; \
docker run -t --rm=true --log-driver=none --name kamailio \
--network my-net \
--ip 10.0.0.2 \
-p 5060:5060/udp -p 5060:5060 -p 5061:5061 \
--hostname kamailio.my-net \
-v /etc/kamailio:/etc/kamailio \
kamailio/kamailio-ci'
ExecStop=/usr/bin/docker stop kamailio
[Install]
WantedBy=multi-user.targetTo simplify kamailio managment you can add alias for kamctl to .bashrc file as example bellow.
alias kamctl='docker exec -i -t kamailio /usr/sbin/kamctl'