-
Notifications
You must be signed in to change notification settings - Fork 40
Expand file tree
/
Copy pathrelease.Dockerfile
More file actions
72 lines (58 loc) · 1.77 KB
/
Copy pathrelease.Dockerfile
File metadata and controls
72 lines (58 loc) · 1.77 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
ARG BUILDER_IMAGE=arm32v7/debian:bookworm-20240513
FROM --platform=linux/arm/v7 ${BUILDER_IMAGE} AS builder
ARG MAINTAINER_NAME="Andrey Volk"
ARG MAINTAINER_EMAIL="andrey@signalwire.com"
ARG BUILD_NUMBER=42
ARG GIT_SHA=0000000000
ARG DATA_DIR=/data
LABEL maintainer="${MAINTAINER_NAME} <${MAINTAINER_EMAIL}>"
SHELL ["/bin/bash", "-c"]
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get -q update \
&& apt-get -y -q install \
apt-transport-https \
autoconf \
automake \
build-essential \
ca-certificates \
cmake \
curl \
debhelper \
devscripts \
dh-autoreconf \
dos2unix \
doxygen \
dpkg-dev \
git \
gnupg2 \
graphviz \
libglib2.0-dev \
libssl-dev \
lsb-release \
pkg-config \
unzip \
wget
RUN update-ca-certificates --fresh
RUN git config --global --add safe.directory '*' \
&& git config --global user.name "${MAINTAINER_NAME}" \
&& git config --global user.email "${MAINTAINER_EMAIL}"
RUN --mount=type=secret,id=REPO_PASSWORD,required=true \
sha512sum /run/secrets/REPO_PASSWORD && \
curl -sSL https://freeswitch.org/fsget | \
bash -s $(cat /run/secrets/REPO_PASSWORD) release && \
apt-get --quiet update && \
apt-get --yes --quiet install \
libks2 \
&& rm -f /etc/apt/auth.conf
# Bootstrap and Build
COPY . ${DATA_DIR}
WORKDIR ${DATA_DIR}
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/ /