Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
dwilkie committed Oct 20, 2023
1 parent 15d292e commit 570342b
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions components/gateway/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
FROM debian:bullseye-slim AS bootstrap
# https://apt.opensips.org/packages.php?os=bookworm

FROM debian:bookworm-slim AS bootstrap

USER root

Expand All @@ -7,13 +9,13 @@ ENV DEBIAN_FRONTEND noninteractive
ARG OPENSIPS_VERSION=3.3
ARG OPENSIPS_BUILD=releases

RUN apt-get -y update -qq && apt-get -y install gnupg2 ca-certificates
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 echo "deb https://apt.opensips.org bullseye cli-nightly" > /etc/apt/sources.list.d/opensips-cli.list
RUN apt-get -y update -qq && apt-get -y install opensips opensips-postgres-module opensips-cli python3-psycopg2 m4

RUN rm -rf /var/lib/apt/lists/*
RUN apt-get -y update -qq && apt-get -y install gnupg2 ca-certificates curl && \
curl https://apt.opensips.org/opensips-org.gpg -o /usr/share/keyrings/opensips-org.gpg && \
echo "deb [signed-by=/usr/share/keyrings/opensips-org.gpg] https://apt.opensips.org bookworm ${OPENSIPS_VERSION}-${OPENSIPS_BUILD}" >/etc/apt/sources.list.d/opensips.list && \
echo "deb [signed-by=/usr/share/keyrings/opensips-org.gpg] https://apt.opensips.org bookworm cli-nightly" >/etc/apt/sources.list.d/opensips-cli.list && \
apt-get -y update -qq && apt-get -y install opensips opensips-postgres-module opensips-cli python3-psycopg2 m4 && \
apt-get purge -y --auto-remove curl && \
rm -rf /var/lib/apt/lists/*

COPY bootstrap.sh /docker-entrypoint.sh

Expand All @@ -28,7 +30,7 @@ CMD ["create_db"]

# Build

FROM debian:bullseye-slim AS build
FROM debian:bookworm-slim AS build

USER root

Expand All @@ -37,12 +39,11 @@ ENV DEBIAN_FRONTEND noninteractive
ARG OPENSIPS_VERSION=3.3
ARG OPENSIPS_BUILD=releases

RUN apt-get -y update -qq && apt-get -y install gnupg2 ca-certificates iproute2
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-postgres-module opensips-auth-modules netcat jq curl

RUN rm -rf /var/lib/apt/lists/*
RUN apt-get -y update -qq && apt-get -y install gnupg2 ca-certificates iproute2 && \
curl https://apt.opensips.org/opensips-org.gpg -o /usr/share/keyrings/opensips-org.gpg && \
echo "deb [signed-by=/usr/share/keyrings/opensips-org.gpg] https://apt.opensips.org bookworm ${OPENSIPS_VERSION}-${OPENSIPS_BUILD}" >/etc/apt/sources.list.d/opensips.list && \
apt-get -y update -qq && apt-get -y install opensips opensips-postgres-module opensips-auth-modules netcat jq curl && \
rm -rf /var/lib/apt/lists/*

ENTRYPOINT ["/docker-entrypoint.sh"]
CMD ["opensips"]
Expand All @@ -60,4 +61,3 @@ FROM build AS client_gateway

COPY client_gateway/opensips.cfg /etc/opensips/opensips.cfg
COPY client_gateway/docker-entrypoint.sh /docker-entrypoint.sh

0 comments on commit 570342b

Please sign in to comment.