From d54a2b1d86fb47eace7c9cd17c47085d0e008f8c Mon Sep 17 00:00:00 2001 From: Maksym Sobolyev Date: Wed, 24 Jul 2024 00:00:59 -0700 Subject: [PATCH] + e0c603a41619ca --- .github/workflows/rtpproxy_ci.yml | 6 ++++-- docker/Dockerfile.push | 15 +++++++++++---- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/.github/workflows/rtpproxy_ci.yml b/.github/workflows/rtpproxy_ci.yml index 2caecffe6..b1449254c 100644 --- a/.github/workflows/rtpproxy_ci.yml +++ b/.github/workflows/rtpproxy_ci.yml @@ -406,7 +406,7 @@ jobs: env: DOCKER_REPO: sippylabs/rtpproxy LOCAL_REPO: localhost:5000/sippylabs/rtpproxy - PLATFORMS: linux/amd64,linux/i386,linux/arm/v7,linux/arm64 + PLATFORMS: linux/amd64,linux/i386 #,linux/arm/v7,linux/arm64 BASE_IMAGE: debian:12-slim CCACHE_ROOT: ccache steps: @@ -488,7 +488,9 @@ jobs: with: context: . file: ./docker/Dockerfile.push - build-args: BASE_IMAGE=${{ env.LOCAL_REPO }}:latest + build-args: | + BASE_IMAGE=${{ env.BASE_IMAGE }} + BUILD_IMAGE=${{ env.LOCAL_REPO }}:latest push: true tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} diff --git a/docker/Dockerfile.push b/docker/Dockerfile.push index 9edbf77ff..8d04377ca 100644 --- a/docker/Dockerfile.push +++ b/docker/Dockerfile.push @@ -1,5 +1,10 @@ +# syntax=docker/dockerfile:1.7-labs + ARG BASE_IMAGE -FROM $BASE_IMAGE AS build +ARG BUILD_IMAGE +FROM $BASE_IMAGE AS base +FROM $BUILD_IMAGE AS build +FROM base LABEL maintainer="Maksym Sobolyev " USER root @@ -8,9 +13,11 @@ USER root ENV DEBIAN_FRONTEND=noninteractive WORKDIR / -RUN rm -rf /rtpproxy && rm -rf /var/cache/* -FROM $BASE_IMAGE -COPY --from=build / / +#RUN --mount=type=bind,from=build,target=/mnt,rw \ +# rm -rf /mnt/rtpproxy /mnt/var/db/cache/* /mnt/mnt && \ +# cp -Rp /mnt/ / +COPY --from=build --exclude=/rtpproxy/ --exclude=/var/db/cache/ \ + --exclude=/etc/alternatives/ / / ENTRYPOINT ["/usr/local/bin/rtpproxy", "-fF"]