Skip to content

Commit 203cca5

Browse files
authored
Docker: Update to Debian 13 (#812)
1 parent a49f9ac commit 203cca5

File tree

49 files changed

+86
-98
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+86
-98
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions

Dockerfile

Lines changed: 25 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,4 @@
1-
FROM debian:12-slim@sha256:b1a741487078b369e78119849663d7f1a5341ef2768798f7b7406c4240f86aef AS debian-updated
2-
3-
SHELL ["/bin/bash", "-euo", "pipefail", "-c"]
4-
5-
# If we ever need to bust the cache, just change the date here.
6-
# While we don't cache anything in Drone, that might not be true when we migrate to GitHub Actions where some action might automatically enable layer caching.
7-
# This is fine, but is terrible in situations where we want to _force_ an update of a package.
8-
RUN echo 'cachebuster 2025-10-17' && apt-get update
9-
10-
FROM debian-updated AS debs
11-
12-
ARG CHROMIUM_VERSION=141.0.7390.107
13-
RUN apt-cache depends chromium=${CHROMIUM_VERSION} chromium-driver chromium-shell chromium-sandbox font-gothic fonts-wqy-zenhei fonts-thai-tlwg fonts-khmeros fonts-kacst fonts-freefont-ttf libxss1 unifont fonts-open-sans fonts-roboto fonts-inter bash util-linux openssl tini ca-certificates locales libnss3-tools \
14-
--recurse --no-recommends --no-suggests --no-conflicts --no-breaks --no-replaces --no-enhances --no-pre-depends | grep '^\w' | xargs apt-get download
15-
RUN mkdir /dpkg && \
16-
find . -type f -name '*.deb' -exec sh -c 'dpkg --extract "$1" /dpkg || exit 5' sh '{}' \;
17-
18-
FROM debian:testing-slim@sha256:12ce5b90ca703a11ebaae907649af9b000e616f49199a2115340e0cdf007e42a AS ca-certs
19-
20-
RUN apt-get update
21-
RUN apt-cache depends ca-certificates \
22-
--recurse --no-recommends --no-suggests --no-conflicts --no-breaks --no-replaces --no-enhances --no-pre-depends | grep '^\w' | xargs apt-get download
23-
RUN mkdir /dpkg && \
24-
find . -type f -name '*.deb' -exec sh -c 'dpkg --extract "$1" /dpkg || exit 5' sh '{}' \;
25-
26-
# While we can't move to Debian 13 yet for the final image, use its new build of busybox with security fixes.
27-
FROM debian:13-slim@sha256:c85a2732e97694ea77237c61304b3bb410e0e961dd6ee945997a06c788c545bb AS busybox
28-
29-
RUN apt-get update
30-
RUN apt-cache depends busybox-static \
31-
--recurse --no-recommends --no-suggests --no-conflicts --no-breaks --no-replaces --no-enhances --no-pre-depends | grep '^\w' | xargs apt-get download
32-
RUN mkdir /dpkg && \
33-
find . -type f -name '*.deb' -exec sh -c 'dpkg --extract "$1" /dpkg || exit 5' sh '{}' \;
34-
35-
FROM node:22-alpine@sha256:1b2479dd35a99687d6638f5976fd235e26c5b37e8122f786fcd5fe231d63de5b AS build
1+
FROM node:22-trixie AS build
362

373
WORKDIR /src
384
COPY . ./
@@ -41,48 +7,49 @@ RUN yarn install --pure-lockfile
417
RUN yarn run build
428
RUN rm -rf node_modules/ && yarn install --pure-lockfile --production
439

44-
FROM gcr.io/distroless/nodejs22-debian12:nonroot@sha256:8929dbab735ee399ff886ba7d81419dbe7df002993a7d69715e1c16b7d41c531
10+
FROM node:22-trixie AS output_image
4511

4612
LABEL maintainer="Grafana team <[email protected]>"
4713
LABEL org.opencontainers.image.source="https://github.com/grafana/grafana-image-renderer/tree/master/Dockerfile"
4814

49-
COPY --from=debs /dpkg /
50-
COPY --from=busybox /dpkg/usr/bin/busybox /bin/busybox
51-
COPY --from=busybox /dpkg/usr/bin/busybox /usr/bin/busybox
52-
COPY --from=ca-certs /dpkg/usr/share/ca-certificates /usr/share/ca-certificates
15+
# If we ever need to bust the cache, just change the date here.
16+
RUN echo 'cachebuster 2025-10-17' && apt-get update
17+
18+
RUN apt-get install -y --no-install-recommends --no-install-suggests \
19+
fonts-ipaexfont-gothic fonts-wqy-zenhei fonts-thai-tlwg fonts-khmeros fonts-kacst-one fonts-freefont-ttf \
20+
libxss1 unifont fonts-open-sans fonts-roboto fonts-inter fonts-recommended \
21+
bash util-linux openssl tini ca-certificates locales libnss3-tools ca-certificates
22+
23+
ARG CHROMIUM_VERSION=141.0.7390.107
24+
RUN apt-get satisfy -y --no-install-recommends --no-install-suggests \
25+
"chromium (>=${CHROMIUM_VERSION}), chromium-driver (>=${CHROMIUM_VERSION}), chromium-shell (>=${CHROMIUM_VERSION}), chromium-sandbox (>=${CHROMIUM_VERSION})"
26+
RUN apt-get clean && rm -rf /var/lib/apt/lists/*
5327

54-
USER root
55-
SHELL ["/bin/busybox", "sh", "-c"]
56-
RUN /bin/busybox --install
57-
# Verify that the browser was actually installed.
58-
RUN /usr/bin/chromium --version
5928
# This is so the browser can write file names that contain non-ASCII characters.
6029
RUN echo "en_US.UTF-8 UTF-8" > /etc/locale.gen && locale-gen en_US.UTF-8
6130
RUN fc-cache -fr
6231
RUN update-ca-certificates --fresh
63-
USER nonroot
6432

65-
ENV CHROME_BIN="/usr/bin/chromium"
66-
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD="true"
67-
ENV NODE_ENV=production
68-
ENV LANG=en_US.UTF-8
69-
ENV LC_ALL=en_US.UTF-8
33+
USER root
34+
RUN useradd --create-home --system --uid 65532 --user-group nonroot
35+
RUN chgrp -R 0 /home/nonroot && chmod -R g=u /home/nonroot
36+
WORKDIR /home/nonroot
37+
USER 65532
7038

7139
COPY --from=build /src/node_modules node_modules
7240
COPY --from=build /src/build build
7341
COPY --from=build /src/proto proto
7442
COPY --from=build /src/default.json config.json
7543
COPY --from=build /src/plugin.json plugin.json
7644

77-
USER root
78-
79-
RUN chgrp -R 0 /home/nonroot && chmod -R g=u /home/nonroot
80-
81-
USER 65532
82-
8345
EXPOSE 8081
8446

85-
ENTRYPOINT ["tini", "--", "/nodejs/bin/node"]
47+
ENV CHROME_BIN="/usr/bin/chromium"
48+
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD="true"
49+
ENV NODE_ENV=production
50+
ENV LANG=en_US.UTF-8
51+
ENV LC_ALL=en_US.UTF-8
52+
ENTRYPOINT ["tini", "--", "node"]
8653
CMD ["build/app.js", "server", "--config=config.json"]
8754
HEALTHCHECK --interval=10s --retries=3 --timeout=3s \
8855
CMD ["wget", "-O-", "-q", "http://localhost:8081/"]

go.Dockerfile

Lines changed: 19 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -16,58 +16,41 @@ RUN --mount=type=cache,target=/go/pkg/mod CGO_ENABLED=0 go build \
1616
-ldflags '-s -w -extldflags "-static"' \
1717
.
1818

19-
FROM debian:12-slim@sha256:b1a741487078b369e78119849663d7f1a5341ef2768798f7b7406c4240f86aef AS debs
19+
FROM debian:13 AS output_image
2020

21-
SHELL ["/bin/bash", "-euo", "pipefail", "-c"]
21+
LABEL maintainer="Grafana team <[email protected]>"
22+
LABEL org.opencontainers.image.source="https://github.com/grafana/grafana-image-renderer/tree/master/go.Dockerfile"
2223

2324
# If we ever need to bust the cache, just change the date here.
24-
# While we don't cache anything in Drone, that might not be true when we migrate to GitHub Actions where some action might automatically enable layer caching.
25-
# This is fine, but is terrible in situations where we want to _force_ an update of a package.
2625
RUN echo 'cachebuster 2025-10-17' && apt-get update
2726

28-
ARG CHROMIUM_VERSION=141.0.7390.107
29-
RUN apt-cache depends chromium=${CHROMIUM_VERSION} chromium-driver chromium-shell chromium-sandbox font-gothic fonts-wqy-zenhei fonts-thai-tlwg fonts-khmeros fonts-kacst fonts-freefont-ttf libxss1 unifont fonts-open-sans fonts-roboto fonts-inter bash busybox util-linux openssl tini ca-certificates locales libnss3-tools \
30-
--recurse --no-recommends --no-suggests --no-conflicts --no-breaks --no-replaces --no-enhances --no-pre-depends | grep '^\w' | xargs apt-get download
31-
RUN mkdir /dpkg && \
32-
find . -type f -name '*.deb' -exec sh -c 'dpkg --extract "$1" /dpkg || exit 5' sh '{}' \;
33-
34-
FROM debian:testing-slim@sha256:12ce5b90ca703a11ebaae907649af9b000e616f49199a2115340e0cdf007e42a AS ca-certs
35-
36-
RUN apt-get update
37-
RUN apt-cache depends ca-certificates \
38-
--recurse --no-recommends --no-suggests --no-conflicts --no-breaks --no-replaces --no-enhances --no-pre-depends | grep '^\w' | xargs apt-get download
39-
RUN mkdir /dpkg && \
40-
find . -type f -name '*.deb' -exec sh -c 'dpkg --extract "$1" /dpkg || exit 5' sh '{}' \;
41-
42-
FROM gcr.io/distroless/base-debian12:nonroot AS output_image
27+
RUN apt-get install -y --no-install-recommends --no-install-suggests \
28+
fonts-ipaexfont-gothic fonts-wqy-zenhei fonts-thai-tlwg fonts-khmeros fonts-kacst-one fonts-freefont-ttf \
29+
libxss1 unifont fonts-open-sans fonts-roboto fonts-inter fonts-recommended \
30+
bash util-linux openssl tini ca-certificates locales libnss3-tools ca-certificates
4331

44-
LABEL maintainer="Grafana team <[email protected]>"
45-
LABEL org.opencontainers.image.source="https://github.com/grafana/grafana-image-renderer/tree/master/go.Dockerfile"
46-
47-
COPY --from=debs /dpkg /
48-
COPY --from=ca-certs /dpkg/usr/share/ca-certificates /usr/share/ca-certificates
32+
ARG CHROMIUM_VERSION=141.0.7390.107
33+
RUN apt-get satisfy -y --no-install-recommends --no-install-suggests \
34+
"chromium (>=${CHROMIUM_VERSION}), chromium-driver (>=${CHROMIUM_VERSION}), chromium-shell (>=${CHROMIUM_VERSION}), chromium-sandbox (>=${CHROMIUM_VERSION})"
35+
RUN apt-get clean && rm -rf /var/lib/apt/lists/*
4936

50-
USER root
51-
SHELL ["/bin/busybox", "sh", "-c"]
52-
RUN /bin/busybox --install
53-
# Verify that the browser was actually installed.
54-
RUN /usr/bin/chromium --version
5537
# This is so the browser can write file names that contain non-ASCII characters.
5638
RUN echo "en_US.UTF-8 UTF-8" > /etc/locale.gen && locale-gen en_US.UTF-8
5739
RUN fc-cache -fr
5840
RUN update-ca-certificates --fresh
59-
USER nonroot
6041

61-
ENV CHROME_BIN="/usr/bin/chromium"
62-
ENV LANG=en_US.UTF-8
63-
ENV LC_ALL=en_US.UTF-8
64-
65-
USER root
42+
RUN useradd --create-home --system --uid 65532 --user-group nonroot
6643
RUN chgrp -R 0 /home/nonroot && chmod -R g=u /home/nonroot
67-
COPY --from=app /src/grafana-image-renderer /usr/bin/grafana-image-renderer
44+
WORKDIR /home/nonroot
6845
USER 65532
46+
47+
COPY --from=app /src/grafana-image-renderer /usr/bin/grafana-image-renderer
48+
6949
EXPOSE 8081
7050

51+
ENV CHROME_BIN="/usr/bin/chromium"
52+
ENV LANG=en_US.UTF-8
53+
ENV LC_ALL=en_US.UTF-8
7154
ENTRYPOINT ["tini", "--", "/usr/bin/grafana-image-renderer"]
7255
CMD ["server"]
7356
HEALTHCHECK --interval=10s --retries=3 --timeout=3s --start-interval=250ms --start-period=30s \

plugin.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"url": "https://github.com/grafana/grafana-image-renderer/blob/master/LICENSE"
2525
}
2626
],
27-
"version": "4.0.20",
27+
"version": "4.1.0",
2828
"updated": "2025-10-17"
2929
},
3030
"dependencies": {
819 Bytes
Binary file not shown.
424 Bytes
942 Bytes
Binary file not shown.
1.12 KB
828 Bytes
Binary file not shown.
314 Bytes

0 commit comments

Comments
 (0)