freePBX 17 installation with Docker

Hello,

I’m trying to install freePBX in a docker container that is based on Debian 12, but keep running into the following issue:
702.4 /tmp/sng_freepbx_debian_install.sh: line 1174: fwconsole: command not found

It’s similar to the issue reported here, but in my case the whole installation fails Bash : fwconsole : command not found

For reference this is my Dockerfile:

FROM debian:12

ENV DEBIAN_FRONTEND=noninteractive
ENV container=docker

# Install dependencies
RUN apt-get update && apt-get install -y \
    systemd \
    systemd-sysv \
    dbus \
    wget \
    ca-certificates \
    && rm -rf /var/lib/apt/lists/*

STOPSIGNAL SIGRTMIN+3

RUN systemctl mask \
    dev-hugepages.mount \
    sys-fs-fuse-connections.mount \
    systemd-tmpfiles-setup.service

# Fake out systemctl
RUN ln -sf /bin/true /usr/bin/systemctl


# Download script
RUN wget https://raw.githubusercontent.com/FreePBX/sng_freepbx_debian_install/master/sng_freepbx_debian_install.sh \
    -O /tmp/sng_freepbx_debian_install.sh \
    && chmod +x /tmp/sng_freepbx_debian_install.sh

RUN /tmp/sng_freepbx_debian_install.sh \
    || (echo "Installation failed. Showing log file(s):" && cat /var/log/pbx/*.log && whereis fwconsole && false)


EXPOSE 80 443 5060/udp 5061/udp

CMD ["/sbin/init"]

I added the “whereis fwconsole” and it returns nothing, so it seems like fwconsole is not being installed at all.

These are the logs that I get after the freePBX setup begins:

702.4 Setting up freepbx17 (17.1-1.sng12) …
702.4
702.4 Configuration file ‘/etc/asterisk/ari_additional.conf’
702.4 ==> File on system created by you or by a script.
702.4 ==> File also in package provided by package maintainer.
702.4 ==> Keeping old config file as default.
702.4
702.4 Configuration file ‘/etc/asterisk/ari_general_additional.conf’
702.4 ==> File on system created by you or by a script.
702.4 ==> File also in package provided by package maintainer.
702.4 ==> Keeping old config file as default.
702.4
702.4 Configuration file ‘/etc/asterisk/extensions_additional.conf’
702.4 ==> File on system created by you or by a script.
702.4 ==> File also in package provided by package maintainer.
702.4 ==> Keeping old config file as default.
702.4
702.4 Configuration file ‘/etc/asterisk/smdi.conf’
702.4 ==> File on system created by you or by a script.
702.4 ==> File also in package provided by package maintainer.
702.4 ==> Keeping old config file as default.
702.4
702.4 Configuration file ‘/etc/asterisk/statsd.conf’
702.4 ==> File on system created by you or by a script.
702.4 ==> File also in package provided by package maintainer.
702.4 ==> Keeping old config file as default.
702.4 2025-02-18 15:34:07 - freepbx17 installed successfully…
702.4 2025-02-18 15:34:07 - ###############################
702.4 2025-02-18 15:34:07 - Installing all local modules
702.4 /tmp/sng_freepbx_debian_install.sh: line 1174: fwconsole: command not found
702.4 2025-02-18 15:34:07 - ****** INSTALLATION FAILED *****
702.4 2025-02-18 15:34:07 - Installation failed at step Installing all local modules. Please check log /var/log/pbx/freepbx17-install-2025.02.18-15.22.25.log for details.
702.4 2025-02-18 15:34:07 - Error at line: 1174 exiting with code 127 (last command was: fwconsole ma installlocal >> “$log”)
702.4 2025-02-18 15:34:07 - Exiting script
702.4 fwconsole:

Dockerfile:34

33 |
34 | >>> RUN /tmp/sng_freepbx_debian_install.sh --skipversion --nochrony
35 | >>> || (echo “Installation failed. Showing log file(s):” && cat /var/log/pbx/*.log && whereis fwconsole && false)
36 |

Any advice would be appreciated. Thank you in advance!

Are you able to ensure your BASH ($PATH) is set properly.

/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

Forgot: You user must have root(sudo) privilege.

Hey shanin, thanks for the suggestion! I tried to set the PATH to your suggestion and user to root but I got the same error. For whatever reason the freePBX script fails to install fwconsole. This is the updated dockerfile:

FROM debian:12

ENV DEBIAN_FRONTEND=noninteractive
ENV container=docker
USER root

# Install dependencies
RUN apt-get update && apt-get install -y \
    systemd \
    systemd-sysv \
    dbus \
    wget \
    ca-certificates \
    && rm -rf /var/lib/apt/lists/*

STOPSIGNAL SIGRTMIN+3

RUN systemctl mask \
    dev-hugepages.mount \
    sys-fs-fuse-connections.mount \
    systemd-tmpfiles-setup.service

# Fake out systemctl
RUN ln -sf /bin/true /usr/bin/systemctl

ENV PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"

# Download script
RUN wget https://raw.githubusercontent.com/FreePBX/sng_freepbx_debian_install/master/sng_freepbx_debian_install.sh \
    -O /tmp/sng_freepbx_debian_install.sh \
    && chmod +x /tmp/sng_freepbx_debian_install.sh

# Run install script, if it fails, print logs
RUN /tmp/sng_freepbx_debian_install.sh --skipversion --nochrony \
  || (echo "Installation failed. Showing log file(s):" && cat /var/log/pbx/*.log && false)

EXPOSE 80 443 5060/udp 5061/udp

CMD ["/sbin/init"]

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