Repository navigation
Commit 1e5e90c
fix: Build the Go feature server image in two stages
The go-feature-server image was built and shipped from the full
golang:1.26 image, so every published tag carried the Go toolchain,
gcc, protoc, the module and build caches, and Debian development
packages such as linux-libc-dev. Those packages are flagged by
container scanners (for example DSA-6238-1, DSA-6253-1, DSA-6274-1 and
DSA-6295-1 against linux-libc-dev), and users cannot remediate them
because they come from the base layer.
Keep the existing build steps in a builder stage and copy only the
compiled binary into a debian:trixie-slim runtime stage with
ca-certificates. The builder is pinned to golang:1.26-trixie, which is
what golang:1.26 resolves to today, so the cgo-linked binary (needed by
go-sqlite3) runs against the same glibc release. The working directory,
binary path, exposed port and default command are unchanged, so
existing deployments that mount a feature repo under /app or pass
--chdir keep working.
The runtime image no longer contains linux-libc-dev, the Go toolchain
or compilers, and drops from about 3.1 GB to about 214 MB.
Fixes #7060
Signed-off-by: NopeCharon <[email protected]>1 parent e304a84 commit 1e5e90c
1 file changed
Lines changed: 16 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
27 | 42 | | |
28 | 43 | | |
29 | 44 | | |
| |||
0 commit comments