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..7bdef7879 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 @@ -7,10 +12,10 @@ USER root # Set Environment Variables ENV DEBIAN_FRONTEND=noninteractive -WORKDIR / -RUN rm -rf /rtpproxy && rm -rf /var/cache/* +RUN --mount=type=bind,from=build,target=/mnt,rw \ + rm -rf /mnt/rtpproxy /mnt/var/db/cache/* /mnt/mnt && \ + cp -Rp /mnt/ / -FROM $BASE_IMAGE -COPY --from=build / / +WORKDIR / ENTRYPOINT ["/usr/local/bin/rtpproxy", "-fF"]