Repository navigation
fix(docker): install ca-certificates in the runtime stage - #195
Merged
Merged
Conversation
The released image panics on startup before it ever reaches Discord:
Cannot build reqwest::Client: reqwest::Error { kind: Builder,
source: General("No CA certificates were loaded from the system") }
The runtime stage installs libfontconfig1 and libpq5 but not
ca-certificates, so /etc/ssl/certs is empty in debian:bookworm-slim.
serenity builds its client on the rustls backend, which reads the system
CA store, and the empty store is a hard failure rather than a warning.
Verified: image builds, and /etc/ssl/certs/ca-certificates.crt is present
at 224449 bytes inside it.
Contributor
Release PreviewNext version:
0.4.2 (2026-10-05) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The bot panics on startup from the released image
This is every production deploy of
v0.4.1. The bot exits before itconnects, so no guild has a working bot.
Cause
Dockerfile:30— the runtime stage installslibfontconfig1 libpq5butnot
ca-certificates, so/etc/ssl/certsis empty indebian:bookworm-slim. serenity builds its HTTP client on the rustlsbackend, which reads the system CA store; an empty store is a hard
reqwestbuilder failure, not a warning. Nothing about the bot'sconfiguration or the compose file is involved.
Fix
One package added to the existing
apt-get installline. No restructure.Validation
Not asserted, checked:
docker buildof the full image: succeeds/etc/ssl/certs/ca-certificates.crtinside the built image:224449 bytes, present
Note
Merging this must produce a new image, so this merges without
[no ci].The release will cut
v0.4.2; the compose tag then moves tov0.4.2.