Commit 317c44c
committed
Fix Docker build: statically link CGO binary for distroless
The CGO-enabled binary was dynamically linked against musl libc from
Alpine, but the distroless runtime image uses glibc. This caused
'no such file or directory' at runtime because the dynamic linker
couldn't be found. Fix by passing -linkmode external -extldflags
'-static' to produce a fully static binary.1 parent d608c4b commit 317c44c
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| |||
0 commit comments