FS-10106 [Docker] Updates to Docker Configuration

Updates for the docker configuration to allow for the following:

- Allow for bring in own configuration
- Exposes the Ports needed for non-docker networking
- Allows for mount /tmp to write out logs, etc to the host machine if
  configured as so.
- Health check of the freeswitch service
This commit is contained in:
Richard Genthner committed 2017-03-08 10:20:05 -05:00
1 parent 45a983d712
commit 2895e328a1
5 files changed
+119 -4

No files matched your search

+30 -1
View File
@@ -39,7 +39,36 @@ RUN apt-get update && apt-get install -y freeswitch-all \
&& apt-get clean && rm -rf /var/lib/apt/lists/*
COPY docker-entrypoint.sh /
# Add anything else here
## Ports
# Open the container up to the world.
### 8021 fs_cli, 5060 5061 5080 5081 sip and sips, 64535-65535 rtp
EXPOSE 8021/tcp
EXPOSE 5060/tcp 5060/udp 5080/tcp 5080/udp
EXPOSE 5061/tcp 5061/udp 5081/tcp 5081/udp
EXPOSE 7443/tcp
EXPOSE 5070/udp 5070/tcp
EXPOSE 64535-65535/udp
EXPOSE 16384-32768/udp
# Volumes
## Freeswitch Configuration
VOLUME ["/etc/freeswitch"]
## Tmp so we can get core dumps out
VOLUME ["/tmp"]
# Limits Configuration
COPY build/freeswitch.limits.conf /etc/security/limits.d/
# Healthcheck to make sure the service is running
SHELL ["/bin/bash"]
HEALTHCHECK --interval=15s --timeout=5s \
CMD fs_cli -x status | grep -q ^UP || exit 1
# Clean up
RUN apt-clean --aggressive
## Add additional things here
##