Skip to content

Commit 23fb0f4

Browse files
committed
packaging: add debian trixie support
Signed-off-by: Niels Kristensen <[email protected]>
1 parent 1132279 commit 23fb0f4

File tree

6 files changed

+109
-1
lines changed

6 files changed

+109
-1
lines changed

packaging/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ The [`distros`](./distros/) directory contains OCI container definitions used to
2121
| CentOS | 8 | arm64v8 | centos/8.arm64v8 |
2222
| CentOS | 7 | x86_64 | centos/7 |
2323
| CentOS | 7 | arm64v8 | centos/7.arm64v8 |
24+
| Debian | 13 | x86_64 | debian/trixie |
25+
| Debian | 13 | arm64v8 | debian/trixie.arm64v8 |
2426
| Debian | 12 | x86_64 | debian/bookworm |
2527
| Debian | 12 | arm64v8 | debian/bookworm.arm64v8 |
2628
| Debian | 11 | x86_64 | debian/bullseye |

packaging/build-config.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,14 @@
9696
"target": "debian/bullseye.arm64v8",
9797
"type": "deb"
9898
},
99+
{
100+
"target": "debian/trixie",
101+
"type": "deb"
102+
},
103+
{
104+
"target": "debian/trixie.arm64v8",
105+
"type": "deb"
106+
},
99107
{
100108
"target": "ubuntu/22.04",
101109
"type": "deb"

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/bookworm bookworm 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

packaging/update-repos.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ done
5050
DEB_REPO_PATHS=( "debian/bookworm"
5151
"debian/bullseye"
5252
"debian/buster"
53+
"debian/trixie"
5354
"ubuntu/jammy"
5455
"ubuntu/noble"
5556
"raspbian/bookworm"

0 commit comments

Comments
 (0)