FreePBX 14 and Docker


(Dmitriy Q) #1

Welcome.
FreePBX is running in a container.
Periodically, the FreePBX web interface freezes and fwconsole also does not respond.
Treated by restarting Asterisk: core restart now.

https://pastebin.freepbx.org/view/8d8db30f

[2021-Jun-02 09:24:26] [CRITICAL] (admin/bootstrap.php:260) - Connection attmempt to AMI failed
[2021-Jun-02 09:25:01] [CRITICAL] (admin/bootstrap.php:260) - Connection attmempt to AMI failed

At the same time, in manager.conf and /etc/amportal.conf: AMPMGRUSER and AMPMGRPASS match - FreePBX works.


(Tom Ray) #2

Did you do what the error said?


(Dmitriy Q) #3

What exactly - install PHP-BCMATH?


(Tom Ray) #4

Uhm, yes. You did not install all the needed PHP modules for the system to run. So go install the bcmath module.

PHP: BC Math - Manual


(Matt Brooks) #5

Just a reminder that FreePBX was never designed to be run in a container. I wish you luck on this endeavor.


(Itzik) #6

(TheJames) #7

Most of FreePBX should work ok in docker as far as freepbx itself is concerned. The trick really is the asterisk stuff. The internal plumbing in docker has improved nicely over the years especially with inter-container networking. All this said anyone who does this (correctly) is definitely playing pioneer.

I haven’t seen any benefit to doing this over simply running a virtual machine so I haven’t messed with it. There are plenty of people who have put out dockerfiles where they are basically making a virtual machine with docker putting everything in one monolithic container. That is the “wrong” way to do it.

My primary use over the last decade has been development and frankly I have almost exclusively used virtual machines.