Giter Site home page Giter Site logo

docker-freeswitch's Introduction

Freeswitch SIP Switch

Freeswitch, for use in a kubernetes pod.

Issues

1. Kubernetes Pod hostname's do not reflect it's PodIP assigned DNS.

The hack I've done to work around this requires root privileges at runtime, effectively breaking the ability to set a non root user in the dockerfile. USER freeswitch has been commented out in the dockerfile for this reason.

Docker by design does not allow you to change the hostname of a container after creation. It also manages the /etc/hosts file, which means chown's in the docker build process are set back to root again when a container is created.

EPMD requires that the environment variable: HOSTNAME and the executable: env hostname return a correct and resolvable hostname.

I've fixed this by creating a dummy hostname bash script and place it at the beginning of the path: '/opt/bigcouch/bin/hostname-fix'. In the entrypoint script, if KUBERNETES_HOSTNAME_FIX is set, this script is linked at runtime to '/opt/bigcouch/sbin/hostname', and the environment variable HOSTNAME is set correctly, as well as creating an entry in /etc/hosts.

Only the root user can modify /etc/hosts in a docker container because ownership changes in the build process aren't persisted during container initialization.

If anyone knows of a better way to do this, please submit a pull request with a short explanation of the process you used.

-Joe

docker-freeswitch's People

Watchers

James Cloos 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.