This repository provides Docker images for running Asterisk on Rocky Linux. The images are available on Docker Hub under the repository pablogod/asterisk-rockylinux
with tags corresponding to the Asterisk version and base version.
Note: Only the latest
version supports DTMF over the audiosocket protocol with Asterisk.
Tag | Asterisk Version | Base Version |
---|---|---|
pablogod/asterisk-rockylinux:latest |
latest (not-stable) | 9-minimal |
pablogod/asterisk-rockylinux:22-9-minimal |
22 | 9-minimal |
pablogod/asterisk-rockylinux:22-8-minimal |
22 | 8-minimal |
pablogod/asterisk-rockylinux:21-9-minimal |
21 | 9-minimal |
pablogod/asterisk-rockylinux:21-8-minimal |
21 | 8-minimal |
pablogod/asterisk-rockylinux:20-9-minimal |
20 | 9-minimal |
pablogod/asterisk-rockylinux:20-8-minimal |
20 | 8-minimal |
To build the image locally for all supported base versions, use:
make build
To build for a specific base version, modify the BASE_VERSIONS
variable in the Makefile
.
To run the container, use:
docker run -it \
--network host \
--restart always \
-v /path/to/your/config:/etc/asterisk \
pablogod/asterisk-rockylinux:<version>-<base_version>
Replace /path/to/your/config
with the directory containing your Asterisk configuration files (*.conf
).
Note: The --network host
mode is required to run Asterisk as a node because NAT (Network Address Translation) can cause issues with SIP and RTP protocols. Due to this limitation, it is not possible to run more than one replica of the container in a Kubernetes pod.
You can also use Docker Compose to manage the container. Below is an example docker-compose.yml
file:
version: '3.8'
services:
asterisk:
image: pablogod/asterisk-rockylinux:<version>-<base_version>
network_mode: host
restart: always
volumes:
- /path/to/your/config:/etc/asterisk
Replace <version>-<base_version>
with the desired tag (e.g., 20-9-minimal
) and /path/to/your/config
with the directory containing your Asterisk configuration files (*.conf
).
To start the container using Docker Compose, run:
docker-compose up -d
To stop the container, run:
docker-compose down