Test branch protection
Some checks failed
Docker Build and Push / build-and-push (push) Has been cancelled
Some checks failed
Docker Build and Push / build-and-push (push) Has been cancelled
This commit is contained in:
parent
0b9b62d835
commit
33c48a69a5
80
Dockerfile
Normal file
80
Dockerfile
Normal file
|
@ -0,0 +1,80 @@
|
|||
# Use Debian 12 slim as the base image
|
||||
FROM debian:12-slim
|
||||
|
||||
# Install dependencies (minimal set)
|
||||
RUN apt-get update -y && \
|
||||
apt-get install -y --no-install-recommends \
|
||||
gnupg2 \
|
||||
wget \
|
||||
lsb-release \
|
||||
ca-certificates \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Add FreeSWITCH public repo via build-arg
|
||||
ARG SW_TOKEN
|
||||
RUN wget --http-user=signalwire --http-password=${SW_TOKEN} \
|
||||
-O /usr/share/keyrings/signalwire-freeswitch-repo.gpg \
|
||||
https://freeswitch.signalwire.com/repo/deb/debian-release/signalwire-freeswitch-repo.gpg && \
|
||||
echo "machine freeswitch.signalwire.com login signalwire password ${SW_TOKEN}" > /etc/apt/auth.conf && \
|
||||
chmod 600 /etc/apt/auth.conf && \
|
||||
echo "deb [signed-by=/usr/share/keyrings/signalwire-freeswitch-repo.gpg] https://freeswitch.signalwire.com/repo/deb/debian-release/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/freeswitch.list && \
|
||||
apt-get update -y
|
||||
|
||||
# Install FreeSWITCH with core + logging modules
|
||||
RUN apt-get install -y --no-install-recommends \
|
||||
freeswitch-meta-vanilla \
|
||||
# Core modules
|
||||
freeswitch-mod-commands \
|
||||
freeswitch-mod-sofia \
|
||||
freeswitch-mod-dialplan-xml \
|
||||
freeswitch-mod-loopback \
|
||||
freeswitch-mod-event-socket \
|
||||
# Logging modules
|
||||
freeswitch-mod-console \
|
||||
freeswitch-mod-logfile \
|
||||
freeswitch-mod-syslog \
|
||||
freeswitch-mod-graylog2 \
|
||||
&& apt-get clean \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Configure logging directories and permissions
|
||||
RUN mkdir -p \
|
||||
/etc/freeswitch \
|
||||
/var/lib/freeswitch/recordings \
|
||||
/var/log/freeswitch \
|
||||
/usr/share/freeswitch/scripts && \
|
||||
chown -R freeswitch:freeswitch \
|
||||
/etc/freeswitch \
|
||||
/var/lib/freeswitch \
|
||||
/var/log/freeswitch \
|
||||
/usr/share/freeswitch/scripts
|
||||
|
||||
# Copy default logging config (optional)
|
||||
# COPY conf/autoload_configs/logfile.conf.xml /etc/freeswitch/autoload_configs/
|
||||
|
||||
# Expose ports
|
||||
EXPOSE 5060/tcp 5060/udp
|
||||
EXPOSE 5080/tcp 5080/udp
|
||||
EXPOSE 8021/tcp
|
||||
EXPOSE 16384-32768/udp
|
||||
|
||||
# Runtime configuration
|
||||
USER freeswitch
|
||||
WORKDIR /usr/share/freeswitch
|
||||
|
||||
# Healthcheck
|
||||
HEALTHCHECK --start-period=15s --interval=30s --timeout=5s \
|
||||
CMD fs_cli -x "status" | grep -q "UP" || exit 1
|
||||
|
||||
# Start command with complete path specification
|
||||
CMD ["freeswitch", \
|
||||
"-u", "freeswitch", \
|
||||
"-g", "freeswitch", \
|
||||
"-nonat", \
|
||||
"-nf", \
|
||||
"-nc", \
|
||||
"-rp", \
|
||||
"-conf", "/etc/freeswitch", \
|
||||
"-log", "/var/log/freeswitch", \
|
||||
"-db", "/var/lib/freeswitch/db"]
|
||||
TEST=blocked
|
Loading…
Reference in New Issue
Block a user