Skip to content

Commit 2181632

Browse files
author
Pat
authored
dockerfile: update to bookworm base image (#8916)
* dockerfile: update to bookworm base image Signed-off-by: Patrick Stephens <[email protected]> * dockerfile: switch to libssl3 Signed-off-by: Patrick Stephens <[email protected]> * dockerfile: switch to libffi8 Signed-off-by: Patrick Stephens <[email protected]> * dockerfile: add libcap2 Signed-off-by: Patrick Stephens <[email protected]> * dockerfile: switch to libldap-2.5 Signed-off-by: Patrick Stephens <[email protected]> --------- Signed-off-by: Patrick Stephens <[email protected]>
1 parent 79d5de3 commit 2181632

File tree

1 file changed

+18
-16
lines changed

1 file changed

+18
-16
lines changed

dockerfiles/Dockerfile

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ ARG RELEASE_VERSION=3.0.7
1717
FROM multiarch/qemu-user-static:x86_64-arm as qemu-arm32
1818
FROM multiarch/qemu-user-static:x86_64-aarch64 as qemu-arm64
1919

20-
FROM debian:bullseye-slim as builder-base
20+
FROM debian:bookworm-slim as builder-base
2121

2222
COPY --from=qemu-arm32 /usr/bin/qemu-arm-static /usr/bin/
2323
COPY --from=qemu-arm64 /usr/bin/qemu-aarch64-static /usr/bin/
@@ -33,7 +33,7 @@ RUN mkdir -p /fluent-bit/bin /fluent-bit/etc /fluent-bit/log
3333
ENV DEBIAN_FRONTEND noninteractive
3434

3535
# hadolint ignore=DL3008
36-
RUN echo "deb http://deb.debian.org/debian bullseye-backports main" >> /etc/apt/sources.list && \
36+
RUN echo "deb http://deb.debian.org/debian bookworm-backports main" >> /etc/apt/sources.list && \
3737
apt-get update && \
3838
apt-get install -y --no-install-recommends \
3939
build-essential \
@@ -46,7 +46,7 @@ RUN echo "deb http://deb.debian.org/debian bullseye-backports main" >> /etc/apt/
4646
libssl-dev \
4747
libsasl2-dev \
4848
pkg-config \
49-
libsystemd-dev/bullseye-backports \
49+
libsystemd-dev/bookworm-backports \
5050
zlib1g-dev \
5151
libpq-dev \
5252
postgresql-server-dev-all \
@@ -97,30 +97,30 @@ RUN /fluent-bit/bin/fluent-bit -J > /fluent-bit/etc/schema.json
9797

9898
# Simple example of how to properly extract packages for reuse in distroless
9999
# Taken from: https://github.com/GoogleContainerTools/distroless/issues/863
100-
FROM debian:bullseye-slim as deb-extractor
100+
FROM debian:bookworm-slim as deb-extractor
101101
COPY --from=qemu-arm32 /usr/bin/qemu-arm-static /usr/bin/
102102
COPY --from=qemu-arm64 /usr/bin/qemu-aarch64-static /usr/bin/
103103

104104
# We download all debs locally then extract them into a directory we can use as the root for distroless.
105105
# We also include some extra handling for the status files that some tooling uses for scanning, etc.
106106
WORKDIR /tmp
107107
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
108-
RUN echo "deb http://deb.debian.org/debian bullseye-backports main" >> /etc/apt/sources.list && \
108+
RUN echo "deb http://deb.debian.org/debian bookworm-backports main" >> /etc/apt/sources.list && \
109109
apt-get update && \
110110
apt-get download \
111-
libssl1.1 \
111+
libssl3 \
112112
libsasl2-2 \
113113
pkg-config \
114114
libpq5 \
115-
libsystemd0/bullseye-backports \
115+
libsystemd0/bookworm-backports \
116116
zlib1g \
117117
ca-certificates \
118118
libatomic1 \
119119
libgcrypt20 \
120120
libzstd1 \
121121
liblz4-1 \
122122
libgssapi-krb5-2 \
123-
libldap-2.4-2 \
123+
libldap-2.5 \
124124
libgpg-error0 \
125125
libkrb5-3 \
126126
libk5crypto3 \
@@ -135,9 +135,11 @@ RUN echo "deb http://deb.debian.org/debian bullseye-backports main" >> /etc/apt/
135135
libnettle8 \
136136
libhogweed6 \
137137
libgmp10 \
138-
libffi7 \
138+
libffi8 \
139139
liblzma5 \
140-
libyaml-0-2 && \
140+
libyaml-0-2 \
141+
libcap2 \
142+
&& \
141143
mkdir -p /dpkg/var/lib/dpkg/status.d/ && \
142144
for deb in *.deb; do \
143145
package_name=$(dpkg-deb -I "${deb}" | awk '/^ Package: .*$/ {print $2}'); \
@@ -152,7 +154,7 @@ RUN find /dpkg/ -type d -empty -delete && \
152154

153155
# We want latest at time of build
154156
# hadolint ignore=DL3006
155-
FROM gcr.io/distroless/cc-debian11 as production
157+
FROM gcr.io/distroless/cc-debian12 as production
156158
ARG RELEASE_VERSION
157159
ENV FLUENT_BIT_VERSION=${RELEASE_VERSION}
158160
LABEL description="Fluent Bit multi-architecture container image" \
@@ -183,7 +185,7 @@ EXPOSE 2020
183185
ENTRYPOINT [ "/fluent-bit/bin/fluent-bit" ]
184186
CMD ["/fluent-bit/bin/fluent-bit", "-c", "/fluent-bit/etc/fluent-bit.conf"]
185187

186-
FROM debian:bullseye-slim as debug
188+
FROM debian:bookworm-slim as debug
187189
ARG RELEASE_VERSION
188190
ENV FLUENT_BIT_VERSION=${RELEASE_VERSION}
189191
LABEL description="Fluent Bit multi-architecture debug container image" \
@@ -204,14 +206,14 @@ COPY --from=qemu-arm64 /usr/bin/qemu-aarch64-static /usr/bin/
204206
ENV DEBIAN_FRONTEND noninteractive
205207

206208
# hadolint ignore=DL3008
207-
RUN echo "deb http://deb.debian.org/debian bullseye-backports main" >> /etc/apt/sources.list && \
209+
RUN echo "deb http://deb.debian.org/debian bookworm-backports main" >> /etc/apt/sources.list && \
208210
apt-get update && \
209211
apt-get install -y --no-install-recommends \
210-
libssl1.1 \
212+
libssl3 \
211213
libsasl2-2 \
212214
pkg-config \
213215
libpq5 \
214-
libsystemd0/bullseye-backports \
216+
libsystemd0/bookworm-backports \
215217
zlib1g \
216218
ca-certificates \
217219
libatomic1 \
@@ -225,7 +227,7 @@ RUN echo "deb http://deb.debian.org/debian bullseye-backports main" >> /etc/apt/
225227
openssl \
226228
htop atop strace iotop sysstat ncdu logrotate hdparm pciutils psmisc tree pv \
227229
cmake make tar flex bison \
228-
libssl-dev libsasl2-dev libsystemd-dev/bullseye-backports zlib1g-dev libpq-dev libyaml-dev postgresql-server-dev-all \
230+
libssl-dev libsasl2-dev libsystemd-dev/bookworm-backports zlib1g-dev libpq-dev libyaml-dev postgresql-server-dev-all \
229231
&& apt-get clean \
230232
&& rm -rf /var/lib/apt/lists/*
231233

0 commit comments

Comments
 (0)