Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
sobomax committed Jul 24, 2024
1 parent d8b56e8 commit b4cc472
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 16 deletions.
16 changes: 12 additions & 4 deletions .github/workflows/rtpproxy_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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'
Expand Down Expand Up @@ -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 }}
Expand Down
15 changes: 3 additions & 12 deletions docker/Dockerfile.push
Original file line number Diff line number Diff line change
@@ -1,25 +1,16 @@
ARG BASE_IMAGE
FROM --platform=$TARGETPLATFORM $BASE_IMAGE as build
FROM $BASE_IMAGE AS build
LABEL maintainer="Maksym Sobolyev <[email protected]>"

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"]

0 comments on commit b4cc472

Please sign in to comment.