Commit d51bea2
committed
871ff43 fix: [#317] Update deployer runtime base image from bookworm-slim to trixie-slim (Jose Celano)
262aeb8 docs: [#317] add comprehensive security scan reports for all docker images (Jose Celano)
947ae8a docs: [#317] mark deployer docker base image update as completed (Jose Celano)
2d2dfb4 build: [#317] update deployer docker base image from rust:bookworm to rust:trixie (Jose Celano)
Pull request description:
## Overview
This PR implements issue #317: Update all Docker base images to the latest stable releases for improved security and consistency with the Torrust Tracker ecosystem.
## Changes Made
### 1. Deployer Container Update
- **Change**: Updated `docker/deployer/Dockerfile` from `rust:bookworm` (Debian 12) to `rust:trixie` (Debian 13)
- **Verification**:
- ✅ Docker image builds successfully
- ✅ All 416 unit and integration tests pass
- ✅ Trivy security scan: 1 HIGH (test artifact only), 0 CRITICAL
- ✅ All linters pass
### 2. Security Improvements
- **Deployer**: Reduced from 25 HIGH + 7 CRITICAL (bookworm) to **1 HIGH + 0 CRITICAL (trixie)** - **97% vulnerability reduction**
- **Backup**: Verified using current `debian:trixie-slim` - stable with documented 7 HIGH vulnerabilities
- **SSH Server**: Verified using current `alpine:3.23.3` - minimal Alpine base with 1 HIGH (test artifact)
- **Provisioned Instance**: Verified using current `ubuntu:24.04 LTS` - expected 11 HIGH for reference LTS OS
### 3. Documentation
Created comprehensive security scan reports with build and scan commands:
- **[Deployer Scan](docs/security/docker/scans/torrust-tracker-deployer.md)** - Updated with trixie results
- **[Backup Scan](docs/security/docker/scans/torrust-tracker-backup.md)** - Updated with detailed vulnerability analysis
- **[SSH Server Scan](docs/security/docker/scans/torrust-ssh-server.md)** - New, Alpine 3.23.3 minimal base
- **[Provisioned Instance Scan](docs/security/docker/scans/torrust-tracker-provisioned-instance.md)** - New, Ubuntu 24.04 LTS reference
- **[Scans README](docs/security/docker/scans/README.md)** - Updated with latest status and build/scan commands
### 4. Issue Specification
Updated [Issue #317 Specification](docs/issues/317-update-docker-base-images.md):
- Added build and scan commands for all images
- Linked to detailed scan reports
- Marked implementation as completed with acceptance criteria met
## Alignment with Ecosystem
This update aligns with [Torrust Tracker PR #1629](torrust/torrust-tracker#1629), ensuring consistency across the Torrust ecosystem by using Debian 13 (trixie) as the stable base OS.
## Testing & Verification
- [x] Deployer Docker image builds successfully with trixie base
- [x] All 416 unit and integration tests pass
- [x] Trivy security scan completed for all images
- [x] All linters pass (markdown, YAML, TOML, cspell, Clippy, rustfmt, shellcheck)
- [x] Build from workspace root with correct context
- [x] Pre-commit verification script passes
## Build & Scan Commands
All Docker images can be built and scanned using the documented commands:
```bash
# Build all images
docker build --target release --tag torrust/tracker-deployer:local --file docker/deployer/Dockerfile .
docker build --tag torrust/tracker-backup:local docker/backup/
docker build --tag torrust/tracker-ssh-server:local docker/ssh-server/
docker build --tag torrust/tracker-provisioned-instance:local docker/provisioned-instance/
# Run security scans
trivy image --severity HIGH,CRITICAL torrust/tracker-deployer:local
trivy image --severity HIGH,CRITICAL torrust/tracker-backup:local
trivy image --severity HIGH,CRITICAL torrust/tracker-ssh-server:local
trivy image --severity HIGH,CRITICAL torrust/tracker-provisioned-instance:local
```
## Commits
1. `build: [#317] update deployer docker base image from rust:bookworm to rust:trixie` - Core Dockerfile change
2. `docs: [#317] mark deployer docker base image update as completed` - Updated issue specification
3. `docs: [#317] add comprehensive security scan reports for all docker images` - Complete scan documentation
## Related Issues
- Closes #317
- Related to [Torrust Tracker PR #1629](torrust/torrust-tracker#1629)
ACKs for top commit:
josecelano:
ACK 871ff43
Tree-SHA512: 09a54f9026065c43e7f2d95c7834f9d1856fc02f2ca46a54b81566d41a2d218832739a463ce03bbc33cb9310628bfc2c26918beb0898bbf505eb218ec64a534a
8 files changed
Lines changed: 640 additions & 210 deletions
File tree
- docker/deployer
- docs
- issues
- security/docker/scans
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
| 28 | + | |
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
66 | | - | |
| 66 | + | |
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
101 | 101 | | |
102 | 102 | | |
103 | 103 | | |
104 | | - | |
| 104 | + | |
105 | 105 | | |
106 | | - | |
| 106 | + | |
107 | 107 | | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
| 108 | + | |
112 | 109 | | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
| 110 | + | |
117 | 111 | | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | | - | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
122 | 118 | | |
123 | | - | |
| 119 | + | |
124 | 120 | | |
125 | | - | |
| 121 | + | |
126 | 122 | | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
| 123 | + | |
| 124 | + | |
132 | 125 | | |
133 | | - | |
| 126 | + | |
134 | 127 | | |
135 | | - | |
136 | | - | |
137 | | - | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
138 | 134 | | |
139 | | - | |
| 135 | + | |
140 | 136 | | |
141 | | - | |
142 | | - | |
143 | | - | |
144 | | - | |
145 | | - | |
| 137 | + | |
| 138 | + | |
146 | 139 | | |
147 | | - | |
| 140 | + | |
148 | 141 | | |
149 | | - | |
150 | | - | |
151 | | - | |
152 | | - | |
153 | | - | |
| 142 | + | |
154 | 143 | | |
155 | | - | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
156 | 147 | | |
157 | | - | |
158 | | - | |
159 | | - | |
160 | | - | |
| 148 | + | |
| 149 | + | |
161 | 150 | | |
162 | | - | |
| 151 | + | |
| 152 | + | |
163 | 153 | | |
164 | | - | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
165 | 157 | | |
166 | | - | |
| 158 | + | |
167 | 159 | | |
168 | | - | |
169 | | - | |
170 | | - | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
171 | 163 | | |
172 | | - | |
| 164 | + | |
| 165 | + | |
173 | 166 | | |
174 | | - | |
175 | | - | |
176 | | - | |
| 167 | + | |
| 168 | + | |
177 | 169 | | |
178 | | - | |
179 | | - | |
180 | | - | |
181 | | - | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
182 | 173 | | |
183 | | - | |
184 | | - | |
185 | | - | |
186 | | - | |
| 174 | + | |
187 | 175 | | |
188 | | - | |
| 176 | + | |
189 | 177 | | |
190 | | - | |
191 | | - | |
192 | | - | |
193 | | - | |
194 | | - | |
195 | | - | |
196 | | - | |
197 | | - | |
198 | | - | |
199 | | - | |
200 | | - | |
201 | | - | |
202 | | - | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
203 | 182 | | |
204 | 183 | | |
205 | 184 | | |
206 | 185 | | |
207 | 186 | | |
208 | | - | |
| 187 | + | |
209 | 188 | | |
210 | 189 | | |
211 | 190 | | |
212 | | - | |
213 | | - | |
214 | | - | |
215 | | - | |
216 | | - | |
| 191 | + | |
| 192 | + | |
217 | 193 | | |
218 | 194 | | |
219 | 195 | | |
220 | | - | |
221 | | - | |
222 | | - | |
223 | | - | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
224 | 199 | | |
225 | 200 | | |
226 | 201 | | |
227 | | - | |
228 | | - | |
229 | | - | |
230 | | - | |
231 | | - | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
232 | 205 | | |
233 | 206 | | |
234 | 207 | | |
235 | | - | |
236 | | - | |
237 | | - | |
| 208 | + | |
| 209 | + | |
238 | 210 | | |
239 | 211 | | |
240 | 212 | | |
241 | 213 | | |
242 | | - | |
| 214 | + | |
243 | 215 | | |
244 | | - | |
245 | | - | |
| 216 | + | |
246 | 217 | | |
247 | 218 | | |
248 | 219 | | |
249 | 220 | | |
250 | 221 | | |
251 | 222 | | |
252 | 223 | | |
| 224 | + | |
253 | 225 | | |
254 | 226 | | |
255 | 227 | | |
| |||
262 | 234 | | |
263 | 235 | | |
264 | 236 | | |
265 | | - | |
266 | | - | |
267 | | - | |
268 | | - | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
15 | 17 | | |
16 | | - | |
| 18 | + | |
17 | 19 | | |
18 | 20 | | |
19 | 21 | | |
20 | 22 | | |
21 | 23 | | |
22 | | - | |
23 | | - | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
24 | 28 | | |
25 | 29 | | |
26 | 30 | | |
27 | 31 | | |
28 | 32 | | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
29 | 60 | | |
30 | 61 | | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
35 | 93 | | |
36 | | - | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
0 commit comments