Skip to content

🐋 Minimal FreeSWITCH Docker images

License

Notifications You must be signed in to change notification settings

rtckit/slimswitch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

slimswitch

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

  • FreeSWITCH, FreeSWITCH is a registered trademark of Anthony Minessale II
  • Docker, Docker is a registered trademark of Docker, Inc
  • slimtoolkit

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.