50 lines
1.4 KiB
Text
50 lines
1.4 KiB
Text
FROM gitlab.linphone.org:4567/bc/public/flexisip/bc-dev-debian10:20220708_add_jsoncpp
|
|
MAINTAINER Jehan Monnier <jehan.monnier@linphone.org>
|
|
|
|
ARG sanitizer=OFF
|
|
ARG build_type=Debug
|
|
|
|
# Some Python modules are available as 'bc' user only.
|
|
USER bc
|
|
WORKDIR /home/bc
|
|
|
|
RUN sudo apt-get install -y iptables
|
|
|
|
# Get source code
|
|
COPY --chown=bc:bc . flexisip/
|
|
|
|
# Configure & build
|
|
RUN cd flexisip \
|
|
&& rm -rf work && mkdir work \
|
|
&& cmake -S . -B work -G Ninja -DCMAKE_BUILD_TYPE=${build_type} -DENABLE_SANITIZERS=${sanitizer} -DCMAKE_INSTALL_PREFIX=/opt/belledonne-communications -DSYSCONF_INSTALL_DIR=/etc \
|
|
&& cmake --build work \
|
|
&& sudo cmake --build work --target install
|
|
|
|
# Cleanup
|
|
RUN rm -rf flexisip
|
|
|
|
# Switch to 'root' user
|
|
USER root
|
|
WORKDIR /root
|
|
|
|
# Add Flexisip bindir to the default path
|
|
ENV PATH=/opt/belledonne-communications/bin:$PATH
|
|
|
|
# Create volumes for Flexisip configuration and logs
|
|
RUN mkdir -p /var/opt/belledonne-communications/flexisip /etc/flexisip /home/cores
|
|
VOLUME /etc/flexisip
|
|
VOLUME /var/opt/belledonne-communications/log/flexisip
|
|
|
|
COPY docker/flexisip-entrypoint.sh /
|
|
COPY docker/backtrace.gdb /
|
|
RUN chmod a+x /flexisip-entrypoint.sh
|
|
|
|
# Script to wait db before launch flexisip [Licence Apache2]
|
|
ADD https://github.com/ufoscout/docker-compose-wait/releases/download/2.2.1/wait /wait
|
|
RUN chmod +x /wait
|
|
|
|
# Generate a default configuration
|
|
RUN flexisip --dump-default all > /etc/flexisip/flexisip.conf
|
|
|
|
ENTRYPOINT ["/flexisip-entrypoint.sh"]
|
|
CMD flexisip
|