Given it runs for a short time i would also suspect a memory de allocation issue in one of the modules within asterisk a full os may handle the possible bug differently.
Asterisk docker container.
Let us put some additional commands in docker.
Image name must contain asterisk for it to detect it easy enough to modify to fit your needs clean sh kills all containers and removes them.
Please ensure that you docker is up running without any issue if you wish to verify you docker engine please use hello world application docker run hello world.
Now you can launch a new container and open ports for your container mydebianapacheasterisk.
Creating the base image base image for container from debian buster slim we have chosen debian buster slim for the base image as shown above.
If it runs in a vm but not in docker one possibility is your docker container is not set up right.
That s fine if you have 1 2 ports but if you may have over 10 000 of them that s a big problem.
Our asterisk pbx will reside on debain so first we must set our debian container to install asterisk.
Run sh a suggested way to run the docker container not listed is the asterisk dir where there s a.
You can use either of aws ec2 or cloud9 ide for setting up docker.
Creating asterisk on docker.
Perhaps the needed resources from the os have not been allocated properly.
Asterisk cli sh runs the nsenter command note.
Asterisk pbx docker image.
Total size of this image for latest tag based on alpine linux is.
This image is based on alpine linux image which is only a 5mb image and contains asterisk pbx.
Asterisk poses some challenges for docker namely that the rtp ports are pseudo dynamic and there s a lot of them.
Docker does proxying for each port that s mapped into a container and spawns a docker proxy process for each one.
I want to create a docker with asterisk 16 i can register my sip extension but i don t listen anything.
It is recommended that you keep the container light and use smallest size for the base image.
Additionally entrypoint allows you to configure a container that will run as an executable and will start asterisk when docker run is executed.