Giter Site home page Giter Site logo

docker-flexisip's Introduction

Linphone Flexisip server

This is the Linphone Flexisip Server.

Configuration

There is really only a reference .ini style configuration file that is generated at build time which can be overriden with a volume mount.

Rather than do something hokey with a shell script to generate that configuration based on 12-factor environment variables and some kind of packing scheme, I'm punting on this. Arguably, the configuration is something that something else can take care of. This is meant to be a base image.

That being said, there are a number of ways to go about doing this.

First, here's an example that will pull down the default flexisip.conf file:

mkdir -p flexisip
docker run -it --rm ianblenke/flexisip flexisip --dump-default all > flexisip/flexisip.conf

Now you can merrily update the local flexisip/flexisip.conf file and start a container that uses it:

docker run -d --name flexisip --net=host -v `pwd`/flexisip:/etc/flexisip ianblenke/flexisip

If using a host volume seems less than ideal, you can always pull that configuration via a --volumes-from from a stopped "data" container:

docker run -d --name flexisip-data \
           -v /etc/flexisip ianblenke/flexisip true

docker run -d --name flexisip \
           --net=host --volumes-from flexisip-data ianblenke/flexisip

If you don't mind putting your configuration into a docker image, you could derive your own container image with your own custom configuration from the base image:

cat <<EOF > Dockerfile.$LOGNAME
FROM ianblenke/flexisip
ADD flexisip/flexisip.conf /etc/flexisip/flexisip.conf
EOF
docker build -t $LOGNAME/flexisip -f Dockerfile.$LOGNAME .

If you ran that, you could now skip the volume mounting step entirely:

docker run -d --name flexisip --net=host $LOGNAME/flexisip

The default CMD implied here is:

docker run -d --name flexisip \
           --net=host \
           -v `pwd`/flexisip:/etc/flexisip ianblenke/flexisip \
           flexisip -c /etc/flexisip/flexisip.conf

Individual settings can also be specified on the command line. Here is an example that sets the global debug flag to true:

docker run -d --name flexisip \
           --net=host \
           -v `pwd`/flexisip:/etc/flexisip ianblenke/flexisip \
           flexisip -c /etc/flexisip/flexisip.conf -s global/debug=true

For documentation regarding the config file sections and options, see the Flexisip:module_list wiki page.

SNMP Support

There is also preliminary snmp support included. You can grab the example snmpd.conf from the docker image:

docker run --net=host -it --rm ianblenke/flexisip cat /etc/snmp/snmpd.conf > snmpd.conf

With this, you can specify the custom configuration at runtime:

docker run -d --name flexisip \
           --net=host \
           -v `pwd`/flexisip:/etc/flexisip \
           -v snmpd.conf:/etc/snmp/snmpd.conf \
           ianblenke/flexisip

After running the server above, it is possible to use this image to snmp query the server:

docker run -it --rm --net=host -v snmpd.conf:/etc/snmp/snmpd.conf ianblenke/flexisip \
  snmpwalk -m FLEXISIP-MIB  -v 2c -c public \
           -Of localhost FLEXISIP-MIB::flexisipMIB

docker run -it --rm --net=host -v snmpd.conf:/etc/snmp/snmpd.conf ianblenke/flexisip \
  snmpget -m FLEXISIP-MIB -v 2c -c public \
          -Of localhost FLEXISIP-MIB::flexisipMIB.flexisip.global.debug.0

The running server configuration can be also changed on the fly:

docker run -it --rm --net=host -v snmpd.conf:/etc/snmp/snmpd.conf ianblenke/flexisip \
  snmpset -m FLEXISIP-MIB  -v 2c -c private \
           localhost FLEXISIP-MIB::flexisipMIB.flexisip.global.debug.0 i 1

For documentation regarding snmp, see the Flexisip:snmp wiki page.

docker-flexisip's People

Contributors

gui13 avatar ianblenke avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.