diff --git a/components/gateway/Dockerfile b/components/gateway/Dockerfile index 4567fb8c7..7c8e889f7 100644 --- a/components/gateway/Dockerfile +++ b/components/gateway/Dockerfile @@ -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 @@ -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 @@ -28,7 +30,7 @@ CMD ["create_db"] # Build -FROM debian:bullseye-slim AS build +FROM debian:bookworm-slim AS build USER root @@ -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"] @@ -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 -