1
- ARG BUILDER_IMAGE=arm32v7/debian:bookworm
2
- ARG MAINTAINER=
"Andrey Volk <[email protected] >"
1
+ ARG BUILDER_IMAGE=arm32v7/debian:bookworm-20240513
3
2
4
- FROM ${BUILDER_IMAGE} AS builder
3
+ FROM --platform=linux/arm/v7 ${BUILDER_IMAGE} AS builder
4
+
5
+ ARG MAINTAINER_NAME="Andrey Volk"
6
+ ARG MAINTAINER_EMAIL=
"[email protected] "
7
+
8
+ ARG CODENAME=bookworm
9
+ ARG ARCH=arm32
5
10
6
11
ARG BUILD_NUMBER=42
7
12
ARG GIT_SHA=0000000000
8
13
9
- MAINTAINER ${MAINTAINER}
14
+ ARG DATA_DIR=/data
15
+
16
+ LABEL maintainer="${MAINTAINER_NAME} <${MAINTAINER_EMAIL}>"
10
17
11
18
SHELL ["/bin/bash" , "-c" ]
12
19
13
- RUN apt-get -q update && \
14
- DEBIAN_FRONTEND=noninteractive apt-get -yq install \
20
+ ENV DEBIAN_FRONTEND=noninteractive
21
+
22
+ RUN apt-get -q update \
23
+ && apt-get -y -q install \
15
24
apt-transport-https \
25
+ autoconf \
26
+ automake \
16
27
build-essential \
17
28
ca-certificates \
18
29
cmake \
@@ -22,6 +33,7 @@ RUN apt-get -q update && \
22
33
dh-autoreconf \
23
34
dos2unix \
24
35
doxygen \
36
+ dpkg-dev \
25
37
git \
26
38
graphviz \
27
39
libglib2.0-dev \
@@ -32,35 +44,45 @@ RUN apt-get -q update && \
32
44
33
45
RUN update-ca-certificates --fresh
34
46
35
- ENV DATA_DIR=/data
36
- WORKDIR ${DATA_DIR}
47
+ RUN echo "export CODENAME=${CODENAME}" | tee ~/.env \
48
+ && echo "export ARCH=${ARCH}" | tee -a ~/.env \
49
+ && chmod +x ~/.env
37
50
38
- COPY . ${DATA_DIR}
39
- RUN git reset --hard HEAD && git clean -xfd
51
+ RUN git config --global --add safe.directory '*' \
52
+ && git config --global user.name "${MAINTAINER_NAME}" \
53
+ && git config --global user.email "${MAINTAINER_EMAIL}"
40
54
41
- RUN echo "export CODENAME=$(lsb_release -sc | tr -d '\n ')" | tee ~/.env && \
42
- chmod +x ~/.env
55
+ # Bootstrap and Build
56
+ COPY . ${DATA_DIR}
57
+ WORKDIR ${DATA_DIR}
43
58
44
- RUN git config --global --add safe.directory '*'
59
+ RUN echo "export VERSION=$(dpkg-parsechangelog --show-field Version | cut -f1 -d'-')" \
60
+ | tee -a ~/.env
45
61
46
- # Bootstrap and Build
47
- RUN echo "export VERSION=$(dpkg-parsechangelog --show-field Version | cut -f1 -d'-')" | tee -a ~/.env
48
- RUN . ~/.env && dch \
49
- --controlmaint \
50
- --distribution "${CODENAME}" \
51
- --force-bad-version \
52
- --force-distribution \
53
- --newversion "${VERSION}-${BUILD_NUMBER}-${GIT_SHA}~${CODENAME}" \
54
- "Nightly build, ${GIT_SHA}"
55
-
56
- RUN apt-get -q update && \
57
- mk-build-deps --install --remove debian/control --tool "apt-get -y --no-install-recommends" && \
58
- apt-get -y -f install
62
+ RUN apt-get -q update \
63
+ && mk-build-deps \
64
+ --install \
65
+ --remove debian/control \
66
+ --tool "apt-get -y --no-install-recommends" \
67
+ && apt-get -y -f install
59
68
60
69
ENV DEB_BUILD_OPTIONS="parallel=1"
61
- RUN . ~/.env && dch -b -M -v "${VERSION}-${BUILD_NUMBER}-${GIT_SHA}~${CODENAME}" \
62
- --force-distribution -D "${CODENAME}" "Nightly build, ${GIT_SHA}"
63
- RUN debuild -b -us -uc && mkdir OUT && mv -v ../*.deb OUT/.
70
+
71
+ RUN . ~/.env \
72
+ && dch \
73
+ --controlmaint \
74
+ --distribution "${CODENAME}" \
75
+ --force-bad-version \
76
+ --force-distribution \
77
+ --newversion "${VERSION}-${BUILD_NUMBER}-${GIT_SHA}~${CODENAME}" \
78
+ "Nightly build, ${GIT_SHA}" \
79
+ && debuild \
80
+ --no-tgz-check \
81
+ --build=binary \
82
+ --unsigned-source \
83
+ --unsigned-changes \
84
+ && mkdir OUT \
85
+ && mv -v ../*.{deb,changes} OUT/.
64
86
65
87
# Artifacts image (mandatory part, the resulting image must have a single filesystem layer)
66
88
FROM scratch
0 commit comments