Home

Awesome

<a href="#build-minimal-freeswitch-docker-images"> <img loading="lazy" src="https://raw.github.com/rtckit/media/master/slimswitch/readme-splash.png" alt="slimswitch" class="width-full"> </a>

Build minimal FreeSWITCH Docker images

Docker Pulls License

Tooling for creating lean FreeSWITCH Docker images; resulting containers are efficient and expose a reduced attack surface. This is achieved by layering only the FreeSWITCH core, select modules and their runtime dependencies.

Quickstart

Decide which FreeSWITCH modules should be included and provide a basic XML core/modules configuration file!

git clone https://github.com/rtckit/slimswitch.git
cd slimswitch

./bin/mkslim.sh \
    -m mod_commands -m mod_dptools -m mod_sofia \
    -s local/awesome-switch
docker run --rm -it \
    -v "$(pwd)/freeswitch.xml":/etc/freeswitch/freeswitch.xml \
    local/awesome-switch:v1.10.10

Quickstart

Requirements

Docker and slimtoolkit must be installed in the building environment.

How it works

A generic reusable builder image is created first; the goal is to build the FreeSWITCH core and most of its modules, so then they can be mixed-and-matched as needed. The resulting image can also serve as a base for compiling third party modules. This phase is handled by the ./bin/mkbuilder.sh script. Images corresponding to official FreeSWITCH releases are also publicly available.

The trimming is achieved via the ./bin/mkslim.sh script, which is essentially a wrapper for slimtoolkit; specifically, it leverages its static analysis features so dynamic dependencies are accounted for when the final image is created.

License

MIT, see LICENSE file.

Acknowledgments

Contributing

Bug reports (and small patches) can be submitted via the issue tracker. Forking the repository and submitting a Pull Request is preferred for substantial patches.