From d8b56e8059aa6704ad85a1a4a832bcb64fef72e0 Mon Sep 17 00:00:00 2001 From: Maksym Sobolyev Date: Tue, 23 Jul 2024 21:10:02 -0700 Subject: [PATCH] + 8fed2c2f4f --- docker/Dockerfile | 19 +++++++++++++++---- docker/build.sh | 10 ---------- docker/install_depends.sh | 11 +++++++++++ 3 files changed, 26 insertions(+), 14 deletions(-) create mode 100755 docker/install_depends.sh diff --git a/docker/Dockerfile b/docker/Dockerfile index f09f5fe32..077c6d127 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,16 +1,27 @@ +# syntax=docker/dockerfile:1.7-labs + ARG BASE_IMAGE -FROM --platform=$TARGETPLATFORM $BASE_IMAGE as build +FROM --platform=$TARGETPLATFORM $BASE_IMAGE AS build LABEL maintainer="Maksym Sobolyev " USER root # Set Environment Variables -ENV DEBIAN_FRONTEND noninteractive +ENV DEBIAN_FRONTEND=noninteractive + +# Build & install everything +ARG LIB_DEPS="libsrtp2-1 libbcg729-0 libgsm1 libsndfile1 libunwind8 libssl3" +ARG BUILD_DEPS="file pkg-config clang-15 ccache git make \ + libsrtp2-dev libbcg729-dev libgsm1-dev libsndfile1-dev \ + libunwind-dev libssl-dev" +WORKDIR /tmp +COPY docker/install_depends.sh /tmp +RUN ./install_depends.sh + +COPY --exclude=.git* --link . /rtpproxy/ WORKDIR /rtpproxy -COPY . /rtpproxy/ -# Build & install everything RUN /rtpproxy/docker/build.sh RUN ls -l /usr/local/bin/rtpproxy* RUN ls -l /usr/local/bin/makeann* diff --git a/docker/build.sh b/docker/build.sh index 63e462406..8619473a5 100755 --- a/docker/build.sh +++ b/docker/build.sh @@ -6,16 +6,6 @@ set -x MYPATH="`realpath "${0}"`" RTPDIR="`dirname "${MYPATH}"`/.." -LIB_DEPS="libsrtp2-1 libbcg729-0 libgsm1 libsndfile1 libunwind8 libssl3" - -BUILD_DEPS="file pkg-config clang-15 ccache git make \ - libsrtp2-dev libbcg729-dev libgsm1-dev libsndfile1-dev \ - libunwind-dev libssl-dev" - -apt-get -y update -qq - -apt-get -y install ${LIB_DEPS} ${BUILD_DEPS} - CONFIGURE_ARGS="--enable-librtpproxy" ARCH="`dpkg --print-architecture`" diff --git a/docker/install_depends.sh b/docker/install_depends.sh new file mode 100755 index 000000000..9ad9b8203 --- /dev/null +++ b/docker/install_depends.sh @@ -0,0 +1,11 @@ +#!/bin/sh + +set -e +set -x + +MYPATH="`realpath "${0}"`" +RTPDIR="`dirname "${MYPATH}"`/.." + +apt-get -y update -qq + +apt-get -y install ${LIB_DEPS} ${BUILD_DEPS}