From b4cc4720719c58dbf90284f9fc28ff0a998827ec Mon Sep 17 00:00:00 2001 From: Maksym Sobolyev Date: Tue, 23 Jul 2024 21:22:23 -0700 Subject: [PATCH] + 8fed2c2f4f --- .github/workflows/rtpproxy_ci.yml | 16 ++++++++++++---- docker/Dockerfile.push | 15 +++------------ 2 files changed, 15 insertions(+), 16 deletions(-) diff --git a/.github/workflows/rtpproxy_ci.yml b/.github/workflows/rtpproxy_ci.yml index 8796ce576..7e1acd8a8 100644 --- a/.github/workflows/rtpproxy_ci.yml +++ b/.github/workflows/rtpproxy_ci.yml @@ -398,8 +398,14 @@ jobs: if: needs.LoadJobs_conf.outputs.do_Docker == 'true' && (github.event_name == 'push' || github.event_name == 'pull_request') runs-on: ubuntu-latest + services: + registry: + image: registry:2 + ports: + - 5000:5000 env: DOCKER_REPO: sippylabs/rtpproxy + LOCAL_REPO: localhost:5000/sippylabs/rtpproxy PLATFORMS: linux/amd64 #,linux/i386,linux/arm/v7,linux/arm64 BASE_IMAGE: debian:12-slim steps: @@ -416,6 +422,8 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 + with: + driver-opts: network=host - name: Log in to Docker Hub if: github.event_name != 'pull_request' @@ -458,18 +466,18 @@ jobs: file: ./docker/Dockerfile build-args: BASE_IMAGE=${{ env.BASE_IMAGE }} platforms: ${{ env.PLATFORMS }} - tags: rtpproxy:latest + push: true + tags: ${{ env.LOCAL_REPO }}:latest cache-from: ${{ env.CACHE_SPEC }} cache-to: ${{ env.CACHE_SPEC }},mode=max - name: Push Docker image - if: false uses: docker/build-push-action@v6 with: context: . file: ./docker/Dockerfile.push - build-args: BASE_IMAGE=${{ env.BASE_IMAGE }} - push: true + build-args: BASE_IMAGE=${{ env.LOCAL_REPO }}:latest + push: false tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} platforms: ${{ env.PLATFORMS }} diff --git a/docker/Dockerfile.push b/docker/Dockerfile.push index de637c6b1..9edbf77ff 100644 --- a/docker/Dockerfile.push +++ b/docker/Dockerfile.push @@ -1,25 +1,16 @@ ARG BASE_IMAGE -FROM --platform=$TARGETPLATFORM $BASE_IMAGE as build +FROM $BASE_IMAGE AS build LABEL maintainer="Maksym Sobolyev " USER root # Set Environment Variables -ENV DEBIAN_FRONTEND noninteractive - -WORKDIR /rtpproxy -COPY . /rtpproxy/ - -#install basic components -RUN /rtpproxy/docker/build.sh -RUN ls -l /usr/local/bin/rtpproxy* -RUN ls -l /usr/local/bin/makeann* -RUN ls -l /usr/local/lib/*rtpproxy* +ENV DEBIAN_FRONTEND=noninteractive WORKDIR / RUN rm -rf /rtpproxy && rm -rf /var/cache/* -FROM --platform=$TARGETPLATFORM $BASE_IMAGE +FROM $BASE_IMAGE COPY --from=build / / ENTRYPOINT ["/usr/local/bin/rtpproxy", "-fF"]