-
-
Notifications
You must be signed in to change notification settings - Fork 115
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cache docker build using registry cache.
Use clang-16.
- Loading branch information
Showing
6 changed files
with
106 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,38 @@ | ||
# syntax=docker/dockerfile:1.7-labs | ||
|
||
ARG BASE_IMAGE | ||
FROM --platform=$TARGETPLATFORM $BASE_IMAGE as build | ||
ARG CCACHE_IMAGE=scratch | ||
FROM ${BASE_IMAGE} AS build | ||
RUN mkdir -p /rtpproxy/ccache | ||
FROM ${CCACHE_IMAGE} AS ccache | ||
COPY --from=build /rtpproxy/ccache/ /rtpproxy/ccache/ | ||
FROM build | ||
LABEL maintainer="Maksym Sobolyev <[email protected]>" | ||
|
||
USER root | ||
|
||
# Set Environment Variables | ||
ENV DEBIAN_FRONTEND noninteractive | ||
ENV DEBIAN_FRONTEND=noninteractive | ||
|
||
# Build & install everything | ||
ARG LIB_DEPS="libsrtp2-1 libbcg729-0 libgsm1 libsndfile1 libunwind8 libssl3" | ||
ARG CLANG_VER=15 | ||
ARG BUILD_DEPS="file pkg-config clang-${CLANG_VER} llvm-${CLANG_VER} ccache git make \ | ||
libsrtp2-dev libbcg729-dev libgsm1-dev libsndfile1-dev \ | ||
libunwind-dev libssl-dev" | ||
|
||
WORKDIR /tmp | ||
ARG APT_INSTALL="apt-get install --no-install-recommends -y" | ||
COPY docker/install_depends.sh /tmp | ||
RUN ./install_depends.sh | ||
|
||
COPY --exclude=.git* --link . /rtpproxy/ | ||
|
||
ARG CCACHE_ROOT | ||
|
||
WORKDIR /rtpproxy | ||
COPY . /rtpproxy/ | ||
|
||
# Build & install everything | ||
COPY --from=ccache /rtpproxy/ccache /rtpproxy/ccache | ||
RUN /rtpproxy/docker/build.sh | ||
RUN ls -l /usr/local/bin/rtpproxy* | ||
RUN ls -l /usr/local/bin/makeann* | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
ARG BUILD_IMAGE | ||
FROM ${BUILD_IMAGE} AS build | ||
FROM scratch | ||
COPY --from=build /rtpproxy/ccache /rtpproxy/ccache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,19 @@ | ||
# syntax=docker/dockerfile:1.7-labs | ||
|
||
ARG BASE_IMAGE | ||
FROM --platform=$TARGETPLATFORM $BASE_IMAGE as build | ||
ARG BUILD_IMAGE | ||
FROM $BUILD_IMAGE AS build | ||
RUN rm -rf /rtpproxy && rm -rf /var/cache/* | ||
FROM $BASE_IMAGE | ||
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 | ||
COPY --from=build / / | ||
|
||
ENTRYPOINT ["/usr/local/bin/rtpproxy", "-fF"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/bin/sh | ||
|
||
set -e | ||
set -x | ||
|
||
MYPATH="`realpath "${0}"`" | ||
RTPDIR="`dirname "${MYPATH}"`/.." | ||
|
||
apt-get -y update -qq | ||
|
||
${APT_INSTALL} ${LIB_DEPS} ${BUILD_DEPS} |