diff --git a/.github/workflows/rtp.io.yml b/.github/workflows/rtp.io.yml index 094b258c8c..a6dac1a0a9 100644 --- a/.github/workflows/rtp.io.yml +++ b/.github/workflows/rtp.io.yml @@ -98,3 +98,51 @@ jobs: python -m pip install -r requirements.txt DEBIAN_FRONTEND=noninteractive apt-get install -y gpp sh -x ./test_run.sh + + build_test_rtp_io_dock: + runs-on: ubuntu-latest + env: + BASE_IMAGE: ghcr.io/sippy/rtpproxy:latest + COMPILER: clang-18 + BUILD_OS: ubuntu-latest + PYTHON_VERSION: 3.12 + + steps: + - uses: actions/checkout@v4 + with: + submodules: recursive + + - name: Checkout VoIPTests repo + uses: actions/checkout@v4 + with: + repository: 'sippy/voiptests' + path: dist/voiptests + + - name: Checkout RTPProxy repo + uses: actions/checkout@v4 + with: + repository: 'sippy/rtpproxy' + path: dist/rtpproxy + + - name: Set up QEMU + id: qemu + uses: docker/setup-qemu-action@v3 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Set dynamic environment + run: | + PLATFORMS="`docker manifest inspect ${{ env.BASE_IMAGE }} | \ + jq -r '.manifests[] | "\(.platform.os)/\(.platform.architecture)\(if .platform.variant != null then "/\(.platform.variant)" else "" end)"' | \ + sort -u | paste -sd ','`" + echo "PLATFORMS=${PLATFORMS}" >> $GITHUB_ENV + + - name: Build Docker image + uses: docker/build-push-action@v6 + with: + context: . + file: ./docker/Dockerfile.rtp.io + build-args: | + BASE_IMAGE=${{ env.BASE_IMAGE }} + platforms: ${{ env.PLATFORMS }} diff --git a/docker/Dockerfile.rtp.io b/docker/Dockerfile.rtp.io new file mode 100644 index 0000000000..57d3e4600d --- /dev/null +++ b/docker/Dockerfile.rtp.io @@ -0,0 +1,12 @@ +# syntax=docker/dockerfile:1.7-labs + +ARG BASE_IMAGE="sippylabs/rtpproxy:latest" +FROM --platform=$TARGETPLATFORM $BASE_IMAGE AS build +LABEL maintainer="Maksym Sobolyev " + +USER root + +# Set Environment Variables +ENV DEBIAN_FRONTEND=noninteractive + +RUN --mount=type=bind,source=scripts/build sh -x scripts/build/install_depends.sh