Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions misc/images/debian-base/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@
# the Business Source License, use of this software will be governed
# by the Apache License, Version 2.0.

# `ca-certificates` depends on the `openssl` CLI, so install it in a separate
# stage and copy only the bundle into the final image.
FROM debian:13-slim@sha256:a99cfc517144bc59b1978475ec53b46ecabec7e43635402ee5b77cc54cd1b20a AS ca-certs
Comment on lines +10 to +12

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dependabot handles keeping the two digest pins in sync. /misc/images/debian-base is in .github/dependabot.yml, and it bumps every debian:13-slim pin in a Dockerfile in one PR. For example, #39383 bumped both the apt-deps and useradd stages in distroless-prod-base. distroless-prod-base says this in a comment. Doing the same here tells the next reader they don't need to bump the pins by hand:

Suggested change
# `ca-certificates` depends on the `openssl` CLI, so install it in a separate
# stage and copy only the bundle into the final image.
FROM debian:13-slim@sha256:a99cfc517144bc59b1978475ec53b46ecabec7e43635402ee5b77cc54cd1b20a AS ca-certs
# `ca-certificates` depends on the `openssl` CLI, so install it in a separate
# stage and copy only the bundle into the final image. Dependabot bumps this
# digest pin together with the final stage's.
FROM debian:13-slim@sha256:a99cfc517144bc59b1978475ec53b46ecabec7e43635402ee5b77cc54cd1b20a AS ca-certs

RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates \
&& rm -rf /var/lib/apt/lists/*

FROM debian:13-slim@sha256:a99cfc517144bc59b1978475ec53b46ecabec7e43635402ee5b77cc54cd1b20a

# Ensure any Rust binaries that crash print a backtrace.
Expand All @@ -22,3 +28,8 @@ LABEL build.profile=$BUILD_PROFILE

RUN apt-get update --fix-missing && TZ=UTC DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends eatmydata \
&& rm -rf /var/lib/apt/lists/*

# Rust binaries using the workspace reqwest verify TLS against the system trust
# store and fail to build an HTTP client if it is missing, even when they never
# make a TLS connection.
COPY --from=ca-certs /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
Loading