-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
979 additions
and
6 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,148 @@ | ||
ARG BUILDER_IMAGE=centos:7.2.1511 | ||
|
||
FROM ${BUILDER_IMAGE} AS builder | ||
|
||
# Credentials | ||
ARG REPO_DOMAIN=fsa.freeswitch.com | ||
ARG REPO_USERNAME=user | ||
ARG REPO_PASSWORD=password | ||
|
||
ARG GPG_KEY="/etc/pki/rpm-gpg/RPM-GPG-KEY-FREESWITCH" | ||
ARG GPG_KEY_URL="https://files.freeswitch.org/repo/yum/centos-release/RPM-GPG-KEY-FREESWITCH" | ||
|
||
ARG MAINTAINER="Andrey Volk <[email protected]>" | ||
ARG BUILD_NUMBER=42 | ||
ARG GIT_SHA=0000000000 | ||
|
||
MAINTAINER ${MAINTAINER} | ||
ENV MAINTAINER=${MAINTAINER} | ||
|
||
RUN yum -y update && \ | ||
yum install -y \ | ||
audiofile-devel \ | ||
autoconf \ | ||
automake \ | ||
bind-license \ | ||
centos-release-scl \ | ||
cyrus-sasl-lib \ | ||
dbus \ | ||
dbus-libs \ | ||
devtoolset-9-gcc* \ | ||
dos2unix \ | ||
doxygen \ | ||
dpkg-dev \ | ||
dracut \ | ||
epel-release \ | ||
expat \ | ||
gcc \ | ||
gcc-c++ \ | ||
git \ | ||
glib2 \ | ||
glib2-devel \ | ||
gnupg2 \ | ||
gzip \ | ||
krb5-dxevel \ | ||
libatomic \ | ||
libcurl-devel \ | ||
libtool \ | ||
libuuid-devel \ | ||
libxml2 \ | ||
lksctp-tools-devel \ | ||
lsb_release \ | ||
make \ | ||
multilib-rpm-config \ | ||
openssl-devel \ | ||
pkg-config \ | ||
procps-ng \ | ||
python \ | ||
python-libs \ | ||
rpm-build \ | ||
rpmdevtools \ | ||
scl-utils \ | ||
sqlite \ | ||
swig \ | ||
unzip \ | ||
uuid-devel \ | ||
vim-minimal \ | ||
wget \ | ||
which \ | ||
xz \ | ||
xz-libs \ | ||
yum-plugin-fastestmirror \ | ||
yum-plugin-ovl \ | ||
yum-utils \ | ||
zlib-devel && \ | ||
yum -y clean all | ||
|
||
ENV CMAKE_VERSION 3.22.2 | ||
|
||
RUN set -ex \ | ||
&& curl -kfsSLO --compressed https://cmake.org/files/v3.22/cmake-${CMAKE_VERSION}-linux-x86_64.tar.gz \ | ||
&& curl -kfsSLO --compressed https://cmake.org/files/v3.22/cmake-${CMAKE_VERSION}-SHA-256.txt \ | ||
&& grep "cmake-${CMAKE_VERSION}-linux-x86_64.tar.gz\$" cmake-${CMAKE_VERSION}-SHA-256.txt | sha256sum -c - \ | ||
&& tar xzf cmake-${CMAKE_VERSION}-linux-x86_64.tar.gz -C /usr/local --strip-components=1 --no-same-owner \ | ||
&& rm -rf cmake-${CMAKE_VERSION}* \ | ||
&& cmake --version | ||
|
||
ENV DATA_DIR=/data | ||
WORKDIR ${DATA_DIR} | ||
|
||
COPY . ${DATA_DIR}/ | ||
RUN cd ${DATA_DIR}/ && \ | ||
git reset --hard HEAD && git clean -xfd && \ | ||
cd ${DATA_DIR} | ||
|
||
RUN cat <<EOF > /etc/yum.repos.d/freeswitch.repo | ||
[freeswitch] | ||
name=FreeSWITCH Packages for Enterprise Linux \$releasever - \$basearch | ||
baseurl=https://freeswitch.signalwire.com/repo/yum/centos-release/\$releasever/\$basearch | ||
enabled=1 | ||
gpgcheck=0 | ||
gpgkey=file://${GPG_KEY} | ||
username=\$repousername | ||
password=\$repopassword | ||
|
||
[freeswitch-debuginfo] | ||
name=FreeSWITCH Packages for Enterprise Linux \$releasever - \$basearch - Debug | ||
baseurl=https://freeswitch.signalwire.com/repo/yum/centos-release/\$releasever/\$basearch | ||
enabled=1 | ||
gpgkey=file://${GPG_KEY} | ||
gpgcheck=0 | ||
username=\$repousername | ||
password=\$repopassword | ||
|
||
[freeswitch-source] | ||
name=FreeSWITCH Packages for Enterprise Linux \$releasever - \$basearch - Source | ||
baseurl=https://freeswitch.signalwire.com/repo/yum/centos-release/\$releasever/\$basearch | ||
enabled=1 | ||
gpgkey=file://${GPG_KEY} | ||
gpgcheck=0 | ||
username=\$repousername | ||
password=\$repopassword | ||
EOF | ||
|
||
RUN --mount=type=secret,id=REPO_PASSWORD \ | ||
printf "machine ${REPO_DOMAIN} " > ~/.netrc && \ | ||
printf "login ${REPO_USERNAME} " >> ~/.netrc && \ | ||
printf "password " >> ~/.netrc && \ | ||
cat /run/secrets/REPO_PASSWORD >> ~/.netrc && \ | ||
printf "${REPO_USERNAME}" > /etc/yum/vars/repousername && \ | ||
cat /run/secrets/REPO_PASSWORD > /etc/yum/vars/repopassword | ||
|
||
RUN curl --netrc -o ${GPG_KEY} ${GPG_KEY_URL} | ||
|
||
# Bootstrap and Build | ||
RUN yum -y update && \ | ||
yum install -y \ | ||
libks2 \ | ||
&& \ | ||
yum -y clean all | ||
|
||
RUN PACKAGE_RELEASE="${BUILD_NUMBER}.${GIT_SHA}" cmake . \ | ||
-DCMAKE_BUILD_TYPE=Debug \ | ||
-DCMAKE_INSTALL_PREFIX="/usr" && \ | ||
make package && mkdir OUT && mv -v *.rpm OUT/. | ||
|
||
# Artifacts image (mandatory part, the resulting image must have a single filesystem layer) | ||
FROM scratch | ||
COPY --from=builder /data/OUT/ / |
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,79 @@ | ||
ARG BUILDER_IMAGE=debian:bookworm | ||
ARG MAINTAINER="Andrey Volk <[email protected]>" | ||
|
||
FROM ${BUILDER_IMAGE} AS builder | ||
|
||
# Credentials | ||
ARG REPO_DOMAIN=freeswitch.signalwire.com | ||
ARG REPO_USERNAME=user | ||
ARG REPO_PASSWORD=password | ||
|
||
ARG BUILD_NUMBER=42 | ||
ARG GIT_SHA=0000000000 | ||
|
||
ARG GPG_KEY="/usr/share/keyrings/signalwire-freeswitch-repo.gpg" | ||
|
||
MAINTAINER ${MAINTAINER} | ||
|
||
SHELL ["/bin/bash", "-c"] | ||
|
||
RUN apt-get -q update && \ | ||
DEBIAN_FRONTEND=noninteractive apt-get -yq install \ | ||
apt-transport-https \ | ||
build-essential \ | ||
ca-certificates \ | ||
cmake \ | ||
curl \ | ||
debhelper \ | ||
devscripts \ | ||
dh-autoreconf \ | ||
dos2unix \ | ||
doxygen \ | ||
git \ | ||
graphviz \ | ||
libglib2.0-dev \ | ||
libssl-dev \ | ||
lsb-release \ | ||
pkg-config \ | ||
wget | ||
|
||
RUN update-ca-certificates --fresh | ||
|
||
ENV DATA_DIR=/data | ||
WORKDIR ${DATA_DIR} | ||
|
||
COPY . ${DATA_DIR} | ||
RUN git reset --hard HEAD && git clean -xfd | ||
|
||
RUN echo "export CODENAME=$(lsb_release -sc | tr -d '\n')" | tee ~/.env && \ | ||
chmod +x ~/.env | ||
|
||
RUN . ~/.env && cat <<EOF > /etc/apt/sources.list.d/freeswitch.list | ||
deb [signed-by=${GPG_KEY}] https://${REPO_DOMAIN}/repo/deb/debian-release ${CODENAME} main | ||
deb-src [signed-by=${GPG_KEY}] https://${REPO_DOMAIN}/repo/deb/debian-release ${CODENAME} main | ||
EOF | ||
|
||
RUN --mount=type=secret,id=REPO_PASSWORD \ | ||
printf "machine ${REPO_DOMAIN} " > ~/.netrc && \ | ||
printf "login ${REPO_USERNAME} " >> ~/.netrc && \ | ||
printf "password " >> ~/.netrc && \ | ||
cat /run/secrets/REPO_PASSWORD >> ~/.netrc && \ | ||
cp -f ~/.netrc /etc/apt/auth.conf | ||
|
||
RUN git config --global --add safe.directory '*' | ||
|
||
RUN curl --netrc -o ${GPG_KEY} https://${REPO_DOMAIN}/repo/deb/debian-release/signalwire-freeswitch-repo.gpg | ||
|
||
# Bootstrap and Build | ||
RUN apt-get -q update && \ | ||
DEBIAN_FRONTEND=noninteractive apt-get -yq install \ | ||
libks2 | ||
|
||
RUN PACKAGE_RELEASE="${BUILD_NUMBER}.${GIT_SHA}" cmake . \ | ||
-DCMAKE_BUILD_TYPE=Debug \ | ||
-DCMAKE_INSTALL_PREFIX="/usr" && \ | ||
make package && mkdir OUT && mv -v *.deb OUT/. | ||
|
||
# Artifacts image (mandatory part, the resulting image must have a single filesystem layer) | ||
FROM scratch | ||
COPY --from=builder /data/OUT/ / |
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,79 @@ | ||
ARG BUILDER_IMAGE=arm32v7/debian:bookworm | ||
ARG MAINTAINER="Andrey Volk <[email protected]>" | ||
|
||
FROM ${BUILDER_IMAGE} AS builder | ||
|
||
# Credentials | ||
ARG REPO_DOMAIN=freeswitch.signalwire.com | ||
ARG REPO_USERNAME=user | ||
ARG REPO_PASSWORD=password | ||
|
||
ARG BUILD_NUMBER=42 | ||
ARG GIT_SHA=0000000000 | ||
|
||
ARG GPG_KEY="/usr/share/keyrings/signalwire-freeswitch-repo.gpg" | ||
|
||
MAINTAINER ${MAINTAINER} | ||
|
||
SHELL ["/bin/bash", "-c"] | ||
|
||
RUN apt-get -q update && \ | ||
DEBIAN_FRONTEND=noninteractive apt-get -yq install \ | ||
apt-transport-https \ | ||
build-essential \ | ||
ca-certificates \ | ||
cmake \ | ||
curl \ | ||
debhelper \ | ||
devscripts \ | ||
dh-autoreconf \ | ||
dos2unix \ | ||
doxygen \ | ||
git \ | ||
graphviz \ | ||
libglib2.0-dev \ | ||
libssl-dev \ | ||
lsb-release \ | ||
pkg-config \ | ||
wget | ||
|
||
RUN update-ca-certificates --fresh | ||
|
||
ENV DATA_DIR=/data | ||
WORKDIR ${DATA_DIR} | ||
|
||
COPY . ${DATA_DIR} | ||
RUN git reset --hard HEAD && git clean -xfd | ||
|
||
RUN echo "export CODENAME=$(lsb_release -sc | tr -d '\n')" | tee ~/.env && \ | ||
chmod +x ~/.env | ||
|
||
RUN . ~/.env && cat <<EOF > /etc/apt/sources.list.d/freeswitch.list | ||
deb [signed-by=${GPG_KEY}] https://${REPO_DOMAIN}/repo/deb/rpi/debian-release ${CODENAME} main | ||
deb-src [signed-by=${GPG_KEY}] https://${REPO_DOMAIN}/repo/deb/rpi/debian-release ${CODENAME} main | ||
EOF | ||
|
||
RUN --mount=type=secret,id=REPO_PASSWORD \ | ||
printf "machine ${REPO_DOMAIN} " > ~/.netrc && \ | ||
printf "login ${REPO_USERNAME} " >> ~/.netrc && \ | ||
printf "password " >> ~/.netrc && \ | ||
cat /run/secrets/REPO_PASSWORD >> ~/.netrc && \ | ||
cp -f ~/.netrc /etc/apt/auth.conf | ||
|
||
RUN git config --global --add safe.directory '*' | ||
|
||
RUN curl --netrc -o ${GPG_KEY} https://${REPO_DOMAIN}/repo/deb/rpi/debian-release/signalwire-freeswitch-repo.gpg | ||
|
||
# Bootstrap and Build | ||
RUN apt-get -q update && \ | ||
DEBIAN_FRONTEND=noninteractive apt-get -yq install \ | ||
libks2 | ||
|
||
RUN PACKAGE_RELEASE="${BUILD_NUMBER}.${GIT_SHA}" cmake . \ | ||
-DCMAKE_BUILD_TYPE=Debug \ | ||
-DCMAKE_INSTALL_PREFIX="/usr" && \ | ||
make package && mkdir OUT && mv -v *.deb OUT/. | ||
|
||
# Artifacts image (mandatory part, the resulting image must have a single filesystem layer) | ||
FROM scratch | ||
COPY --from=builder /data/OUT/ / |
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,79 @@ | ||
ARG BUILDER_IMAGE=arm64v8/debian:bookworm | ||
ARG MAINTAINER="Andrey Volk <[email protected]>" | ||
|
||
FROM ${BUILDER_IMAGE} AS builder | ||
|
||
# Credentials | ||
ARG REPO_DOMAIN=freeswitch.signalwire.com | ||
ARG REPO_USERNAME=user | ||
ARG REPO_PASSWORD=password | ||
|
||
ARG BUILD_NUMBER=42 | ||
ARG GIT_SHA=0000000000 | ||
|
||
ARG GPG_KEY="/usr/share/keyrings/signalwire-freeswitch-repo.gpg" | ||
|
||
MAINTAINER ${MAINTAINER} | ||
|
||
SHELL ["/bin/bash", "-c"] | ||
|
||
RUN apt-get -q update && \ | ||
DEBIAN_FRONTEND=noninteractive apt-get -yq install \ | ||
apt-transport-https \ | ||
build-essential \ | ||
ca-certificates \ | ||
cmake \ | ||
curl \ | ||
debhelper \ | ||
devscripts \ | ||
dh-autoreconf \ | ||
dos2unix \ | ||
doxygen \ | ||
git \ | ||
graphviz \ | ||
libglib2.0-dev \ | ||
libssl-dev \ | ||
lsb-release \ | ||
pkg-config \ | ||
wget | ||
|
||
RUN update-ca-certificates --fresh | ||
|
||
ENV DATA_DIR=/data | ||
WORKDIR ${DATA_DIR} | ||
|
||
COPY . ${DATA_DIR} | ||
RUN git reset --hard HEAD && git clean -xfd | ||
|
||
RUN echo "export CODENAME=$(lsb_release -sc | tr -d '\n')" | tee ~/.env && \ | ||
chmod +x ~/.env | ||
|
||
RUN . ~/.env && cat <<EOF > /etc/apt/sources.list.d/freeswitch.list | ||
deb [signed-by=${GPG_KEY}] https://${REPO_DOMAIN}/repo/deb/debian-release ${CODENAME} main | ||
deb-src [signed-by=${GPG_KEY}] https://${REPO_DOMAIN}/repo/deb/debian-release ${CODENAME} main | ||
EOF | ||
|
||
RUN --mount=type=secret,id=REPO_PASSWORD \ | ||
printf "machine ${REPO_DOMAIN} " > ~/.netrc && \ | ||
printf "login ${REPO_USERNAME} " >> ~/.netrc && \ | ||
printf "password " >> ~/.netrc && \ | ||
cat /run/secrets/REPO_PASSWORD >> ~/.netrc && \ | ||
cp -f ~/.netrc /etc/apt/auth.conf | ||
|
||
RUN git config --global --add safe.directory '*' | ||
|
||
RUN curl --netrc -o ${GPG_KEY} https://${REPO_DOMAIN}/repo/deb/debian-release/signalwire-freeswitch-repo.gpg | ||
|
||
# Bootstrap and Build | ||
RUN apt-get -q update && \ | ||
DEBIAN_FRONTEND=noninteractive apt-get -yq install \ | ||
libks2 | ||
|
||
RUN PACKAGE_RELEASE="${BUILD_NUMBER}.${GIT_SHA}" cmake . \ | ||
-DCMAKE_BUILD_TYPE=Debug \ | ||
-DCMAKE_INSTALL_PREFIX="/usr" && \ | ||
make package && mkdir OUT && mv -v *.deb OUT/. | ||
|
||
# Artifacts image (mandatory part, the resulting image must have a single filesystem layer) | ||
FROM scratch | ||
COPY --from=builder /data/OUT/ / |
Oops, something went wrong.