-
Notifications
You must be signed in to change notification settings - Fork 57
/
Copy pathDockerfile
42 lines (31 loc) · 1.36 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
FROM debian:bullseye
LABEL maintainer="Razvan Crainea <[email protected]>"
USER root
# Set Environment Variables
ENV DEBIAN_FRONTEND noninteractive
ARG OPENSIPS_VERSION=3.4
ARG OPENSIPS_VERSION_MINOR
ARG OPENSIPS_VERSION_REVISION=1
ARG OPENSIPS_BUILD=releases
#install basic components
RUN apt-get -y update -qq && apt-get -y install gnupg2 ca-certificates
#add keyserver, repository
RUN apt-key adv --fetch-keys https://apt.opensips.org/pubkey.gpg
RUN echo "deb https://apt.opensips.org bullseye ${OPENSIPS_VERSION}-${OPENSIPS_BUILD}" >/etc/apt/sources.list.d/opensips.list
RUN apt-get -y update -qq && \
apt-get -y install \
opensips${OPENSIPS_VERSION_MINOR:+=$OPENSIPS_VERSION.$OPENSIPS_VERSION_MINOR-$OPENSIPS_VERSION_REVISION}
ARG OPENSIPS_CLI=false
RUN if [ ${OPENSIPS_CLI} = true ]; then \
echo "deb https://apt.opensips.org bullseye cli-nightly" >/etc/apt/sources.list.d/opensips-cli.list \
&& apt-get -y update -qq && apt-get -y install opensips-cli \
;fi
ARG OPENSIPS_EXTRA_MODULES
RUN if [ -n "${OPENSIPS_EXTRA_MODULES}" ]; then \
apt-get -y install ${OPENSIPS_EXTRA_MODULES} \
;fi
RUN rm -rf /var/lib/apt/lists/*
RUN sed -i "s/stderror_enabled=no/stderror_enabled=yes/g" /etc/opensips/opensips.cfg && \
sed -i "s/syslog_enabled=yes/syslog_enabled=no/g" /etc/opensips/opensips.cfg
EXPOSE 5060/udp
ENTRYPOINT ["/usr/sbin/opensips", "-F"]