Commit 225fda9
authored
fix: add CA certificates to Docker image (#1779)
## What this changes
Fixes #1777
This PR adds the Alpine CA certificate bundle to the final Docker image.
The runtime image still uses `scratch`; it now also includes:
```text
/etc/ssl/certs/ca-certificates.crt
````
## Why
The official Docker image is currently based on `scratch`. When using
HTTPS/S3/REST-style backends, `reqwest` needs system CA certificates for
TLS verification.
Without a CA bundle, rustic can panic during HTTP client initialization:
```text
Client::new(): reqwest::Error { kind: Builder, source: General("No CA certificates were loaded from the system") }
```
This happened with `ghcr.io/rustic-rs/rustic:latest` / rustic `0.11.3`
while backing up to an OpenDAL B2 repository.
## Testing
I built and pushed a test image with this change, then used it in my
Docker Compose backup setup with an OpenDAL B2 repository.
The backup completed successfully:
```text
[INFO] repository opendal:b2:: password is correct.
[INFO] snapshot 8706869a successfully saved.
backup completed for data artifact=8706869a
step backup succeeded
backup task finished successfully
```
This confirms that TLS initialization works when the CA bundle is
available in the Docker image.1 parent e545ab2 commit 225fda9
1 file changed
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
| |||
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
| 19 | + | |
18 | 20 | | |
0 commit comments