Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 12 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,31 +1,37 @@
##
## Build rtpengine from source
##
FROM debian:bookworm AS builder
FROM debian:bookworm-slim AS builder

WORKDIR /build

ARG TAG_NAME=master
ENV DEBIAN_FRONTEND noninteractive
ARG TARGETARCH
ENV DEBIAN_FRONTEND=noninteractive

RUN apt-get update && apt-get -y install build-essential git curl \
&& echo 'man-db man-db/auto-update boolean false' | debconf-set-selections \
&& git clone https://github.com/sipwise/rtpengine \
&& cd rtpengine \
&& git checkout ${TAG_NAME} \
&& apt-get -y build-dep -Ppkg.ngcp-rtpengine.nobcg729 . \
&& dpkg-buildpackage -Ppkg.ngcp-rtpengine.nobcg729 \
&& curl -qL -o /usr/bin/netdiscover https://github.com/CyCoreSystems/netdiscover/releases/download/v1.2.5/netdiscover.linux.amd64 \
&& dpkg-buildpackage -Ppkg.ngcp-rtpengine.nobcg729 -j1 \
&& case ${TARGETARCH} in \
amd64) ARCH_SUFFIX="linux_amd64" ;; \
arm64) ARCH_SUFFIX="linux_arm64" ;; \
*) echo "Unsupported architecture: ${TARGETARCH}" && exit 1 ;; \
esac \
&& curl -qL -o /usr/bin/netdiscover https://github.com/2bleere/netdiscover/releases/download/latest/netdiscover_${ARCH_SUFFIX} \
&& chmod +x /usr/bin/netdiscover

##
## Runner
##
FROM debian:bookworm
FROM debian:bookworm-slim

WORKDIR /opt/rtpengine

ENV DEBIAN_FRONTEND noninteractive
ENV DEBIAN_FRONTEND=noninteractive

RUN groupadd -r rtpengine && useradd -r -g rtpengine rtpengine

Expand Down