Skip to content

Commit c0b8c7c

Browse files
packaging: merge in Debian Trixie build support
Signed-off-by: Patrick Stephens <[email protected]>
1 parent 2f8b076 commit c0b8c7c

File tree

4 files changed

+116
-3
lines changed

4 files changed

+116
-3
lines changed

packaging/README.md

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,26 @@ The [`distros`](./distros/) directory contains OCI container definitions used to
1111

1212
| Distro | Version / Code Name | Arch | Target Option |
1313
|---------------|---------------------------|---------|--------------------------|
14-
| AmazonLinux | 2 | x86_64 | amazonlinux/2 |
15-
| AmazonLinux | 2 | arm64v8 | amazonlinux/2.arm64v8 |
14+
| AlmaLinux | 10 | x86_64 | almalinux/10 |
15+
| AlmaLinux | 10 | arm64v8 | almalinux/10.arm64v8 |
16+
| AlmaLinux | 9 | x86_64 | almalinux/9 |
17+
| AlmaLinux | 9 | arm64v8 | almalinux/9.arm64v8 |
18+
| AlmaLinux | 8 | x86_64 | almalinux/8 |
19+
| AlmaLinux | 8 | arm64v8 | almalinux/8.arm64v8 |
1620
| AmazonLinux | 2023 | x86_64 | amazonlinux/2023 |
1721
| AmazonLinux | 2023 | arm64v8 | amazonlinux/2023.arm64v8 |
22+
| AmazonLinux | 2 | x86_64 | amazonlinux/2 |
23+
| AmazonLinux | 2 | arm64v8 | amazonlinux/2.arm64v8 |
24+
| CentOS Stream | 10 | x86_64 | centos/10 |
25+
| CentOS Stream | 10 | arm64v8 | centos/10.arm64v8 |
1826
| CentOS Stream | 9 | x86_64 | centos/9 |
1927
| CentOS Stream | 9 | arm64v8 | centos/9.arm64v8 |
2028
| CentOS | 8 | x86_64 | centos/8 |
2129
| CentOS | 8 | arm64v8 | centos/8.arm64v8 |
2230
| CentOS | 7 | x86_64 | centos/7 |
2331
| CentOS | 7 | arm64v8 | centos/7.arm64v8 |
32+
| Debian | 13 | x86_64 | debian/trixie |
33+
| Debian | 13 | arm64v8 | debian/trixie.arm64v8 |
2434
| Debian | 12 | x86_64 | debian/bookworm |
2535
| Debian | 12 | arm64v8 | debian/bookworm.arm64v8 |
2636
| Debian | 11 | x86_64 | debian/bullseye |
@@ -39,6 +49,12 @@ The [`distros`](./distros/) directory contains OCI container definitions used to
3949
| Raspbian | 12 / Bookworm | arm32v7 | raspbian/bookworm |
4050
| Raspbian | 11 / Bullseye | arm32v7 | raspbian/bullseye |
4151
| Raspbian | 10 / Buster | arm32v7 | raspbian/buster |
52+
| Rocky Linux | 10 | x86_64 | rockylinux/10 |
53+
| Rocky Linux | 10 | arm64v8 | rockylinux/10.arm64v8 |
54+
| Rocky Linux | 9 | x86_64 | rockylinux/9 |
55+
| Rocky Linux | 9 | arm64v8 | rockylinux/9.arm64v8 |
56+
| Rocky Linux | 8 | x86_64 | rockylinux/8 |
57+
| Rocky Linux | 8 | arm64v8 | rockylinux/8.arm64v8 |
4258

4359
These container images are intended to be built from the root of this repo to build the locally checked out/updated version of the source easily for any target.
4460

packaging/distros/debian/Dockerfile

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,56 @@ RUN apt-get -qq update && \
169169

170170
ENV PATH="${CMAKE_HOME}/bin:${PATH}"
171171

172+
# debian/trixie base image
173+
FROM debian:trixie-slim AS debian-trixie-base
174+
ENV DEBIAN_FRONTEND="noninteractive" \
175+
CMAKE_HOME="/opt/cmake"
176+
177+
ARG CMAKE_VERSION="3.31.6"
178+
ARG CMAKE_URL="https://github.com/Kitware/CMake/releases/download"
179+
180+
# hadolint ignore=DL3008,DL3015
181+
RUN apt-get -qq update && \
182+
apt-get install -y curl ca-certificates build-essential \
183+
make bash sudo wget unzip dh-make \
184+
libsystemd-dev zlib1g-dev flex bison \
185+
libssl3 libssl-dev libpq-dev postgresql-server-dev-all \
186+
libsasl2-2 libsasl2-dev libyaml-dev libcurl4-openssl-dev pkg-config \
187+
tar gzip && \
188+
apt-get install -y --reinstall lsb-base lsb-release && \
189+
mkdir -p "${CMAKE_HOME}" && \
190+
cmake_download_url="${CMAKE_URL}/v${CMAKE_VERSION}/cmake-${CMAKE_VERSION}-linux-$(uname -m).tar.gz" && \
191+
echo "Downloading CMake ${CMAKE_VERSION}: ${cmake_download_url} -> ${CMAKE_HOME}" && \
192+
curl -jksSL "${cmake_download_url}" | tar -xzf - -C "${CMAKE_HOME}" --strip-components 1
193+
194+
ENV PATH="${CMAKE_HOME}/bin:${PATH}"
195+
196+
# debian/trixie.arm64v8 base image
197+
FROM arm64v8/debian:trixie-slim AS debian-trixie.arm64v8-base
198+
ENV DEBIAN_FRONTEND="noninteractive" \
199+
CMAKE_HOME="/opt/cmake"
200+
201+
COPY --from=multiarch-aarch64 /usr/bin/qemu-aarch64-static /usr/bin/qemu-aarch64-static
202+
203+
ARG CMAKE_VERSION="3.31.6"
204+
ARG CMAKE_URL="https://github.com/Kitware/CMake/releases/download"
205+
206+
# hadolint ignore=DL3008,DL3015
207+
RUN apt-get -qq update && \
208+
apt-get install -y curl ca-certificates build-essential \
209+
make bash sudo wget unzip dh-make \
210+
libsystemd-dev zlib1g-dev flex bison \
211+
libssl3 libssl-dev libpq-dev postgresql-server-dev-all \
212+
libsasl2-2 libsasl2-dev libyaml-dev libcurl4-openssl-dev pkg-config \
213+
tar gzip && \
214+
apt-get install -y --reinstall lsb-base lsb-release && \
215+
mkdir -p "${CMAKE_HOME}" && \
216+
cmake_download_url="${CMAKE_URL}/v${CMAKE_VERSION}/cmake-${CMAKE_VERSION}-linux-$(uname -m).tar.gz" && \
217+
echo "Downloading CMake ${CMAKE_VERSION}: ${cmake_download_url} -> ${CMAKE_HOME}" && \
218+
curl -jksSL "${cmake_download_url}" | tar -xzf - -C "${CMAKE_HOME}" --strip-components 1
219+
220+
ENV PATH="${CMAKE_HOME}/bin:${PATH}"
221+
172222
# Common build for all distributions now
173223
# hadolint ignore=DL3006
174224
FROM $BASE_BUILDER AS builder
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# For staging upgrade we use the 'official-install' as the base
2+
ARG STAGING_BASE=docker.io/dokken/debian-13
3+
4+
ARG RELEASE_URL=https://packages.fluentbit.io
5+
ARG RELEASE_KEY=https://packages.fluentbit.io/fluentbit.key
6+
7+
# hadolint ignore=DL3006
8+
FROM docker.io/dokken/debian-13 as official-install
9+
10+
ARG RELEASE_URL
11+
ENV FLUENT_BIT_PACKAGES_URL=${RELEASE_URL}
12+
13+
ARG RELEASE_KEY
14+
ENV FLUENT_BIT_PACKAGES_KEY=${RELEASE_KEY}
15+
16+
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
17+
RUN curl https://raw.githubusercontent.com/fluent/fluent-bit/master/install.sh | sh
18+
RUN systemctl enable fluent-bit
19+
20+
COPY ./test.sh /test.sh
21+
RUN chmod a+x /test.sh
22+
23+
FROM official-install as staging-upgrade-prep
24+
RUN rm -f /etc/apt/sources.list.d/fluent-bit.list
25+
26+
# hadolint ignore=DL3006
27+
FROM ${STAGING_BASE} as staging-install
28+
ARG STAGING_VERSION
29+
ENV STAGING_VERSION=${STAGING_VERSION}
30+
31+
ARG STAGING_URL
32+
ENV FLUENT_BIT_PACKAGES_URL=${STAGING_URL}
33+
34+
ARG STAGING_KEY=${STAGING_URL}/fluentbit.key
35+
ENV FLUENT_BIT_PACKAGES_KEY=${STAGING_KEY}
36+
37+
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
38+
RUN wget -qO - $FLUENT_BIT_PACKAGES_KEY | apt-key add -
39+
RUN echo "deb $FLUENT_BIT_PACKAGES_URL/debian/trixie trixie main" >> /etc/apt/sources.list
40+
# hadolint ignore=DL3015,DL3008,DL3009
41+
RUN apt-get update && apt-get install -y fluent-bit
42+
RUN systemctl enable fluent-bit
43+
44+
COPY ./test.sh /test.sh
45+
RUN chmod a+x /test.sh
46+
47+
FROM staging-install as staging-upgrade

packaging/update-apt-repo.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ if [[ ! -d "$BASE_PATH" ]]; then
1010
exit 1
1111
fi
1212

13-
# "debian/bookworm" "debian/bullseye" "debian/buster" "ubuntu/xenial" "ubuntu/bionic" "ubuntu/focal" "ubuntu/jammy" "raspbian/buster" "raspbian/bullseye"
13+
# "debian/bookworm" "debian/bullseye" "debian/buster" "debian/trixie" "ubuntu/xenial" "ubuntu/bionic" "ubuntu/focal" "ubuntu/jammy" "raspbian/buster" "raspbian/bullseye"
1414
DEB_REPO=${DEB_REPO:?}
1515

1616
# Set true to prevent signing

0 commit comments

Comments
 (0)