Future Docker work?

Are there any plans to make an official Docker container for FreePBX? I’ve been using Discourse, an excellent open source forum program (that is running the FreePBX community forum, in fact), and they are very keen on the program being run with Docker.

It would be nice to have a single virtual server running more than one program as Docker allows, so I just wanted to see if there’s any official work going on to incorporate FreePBX into a container so a whole server doesn’t have to be dedicated to it.

Currently the project is not structured in a way that docker makes sense. While you can run FreePBX with docker, there are docker files around the internet, they are essentially using docker as a VM which it is not.

There would have to be some plumbing work at a minimum. We <3 docker for a lot of things but it is not currently on the radar for FreePBX. This doesn’t mean it never will be, just not yet.

Thanks @jfinstrom. I’m no expert on Docker and when it is good to use and when it is not. What about FreePBX doesn’t make it good for a docker application?

Edit: I just found an interesting discussion on Discourse’s forum about why they insist on Docker:

@xrobau may be better to explain it out. Essentially containers are suppose to be single purpose and you currently would have to run multiple items in a single container

@xrobau, could you help explain to me the issues that come along with FreePBX and Docker?

I guess the question really is, can freepbx sit on a different “host”?

Docker best practice in how it would apply to freepbx is you would have Asterisk in one container, FreePBX in another container, MySQL in a third, HylaFax in a fourth container… so one and so forth… each piece would have it’s own container…

This makes version control more controllable… does FreePBX 13 work with Asterisk 16? You make your containers talk to each other and work… then you “upgrade” the Asterisk container… if it works, great. if not, you simply roll back your asterisk, not everything.


No it’s not. “Best Practices” are “keep logically separate things separate”. You’re splitting up things for the sake of splitting up things.

Also, as I’ve said before - docker is THE WORST IDEA for VoIP. Docker Proxy requires a daemon for every listening port.

If you want to put FreePBX in a container, use LXC. It gives each container a proper IP address, and doesn’t need a proxy running for every port.

Different dialplan is generated for different versions of asterisk. You literally can’t do it that way.

I would concur running Voip in a single container would not be a good idea.

Though personally I would like to see the performance difference in a Kubernetes cluster vs load-balanced VMs… just to see it :smiley:

I do feel i need to correct something though…

Not completely true… I could see how the HylaFax would make it look that way, but I already have a MySQL container which is utilized by a number of other containers. Adding a second MySQL instance would be a waste of resources. If i actually gave it some thought HylaFax would go into one of the other containers, But Asterisk, FreePBX, and MySQL would be separate containers as they are logically separate things.

They’re not. Asterisk and FreePBX need to have the same filesystem. MySQL is exposed to the internet (via FreePBX) so you don’t want to use a shared service.

Hylafax ALSO needs access to the Asterisk filesystem.

@xrobau, Thanks for the info. I don’t know anything about LXC, but have you seen it successfully used with FreePBX?

Yes, I use it all the time - you, the user, just treat it as a VM. As it has a proper NIC, you could probably (with some minor hacking) make it into an (activateable) Distro system, but I wouldn’t go asking for support on it!

All you need to do is lxc launch ubuntu:18.04 freepbx and then follow the Ubuntu Docs - use lxc exec freepbx /bin/bash to get into the container.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.