Repository navigation
Commit 665f67e
committed
fix: cross-compile binaries for the requested target platform
All published platform variants (386, arm/v6, arm/v7, arm64, ppc64le)
contained the same amd64 binary: the builder stage runs on
BUILDPLATFORM but go build never set GOOS/GOARCH, so images only
worked where emulation (e.g. Rosetta) was available.
Build with explicit GOOS/GOARCH/GOARM from BuildKit platform args and
add an xx-verify --static guard so any future cross-compile regression
fails the build instead of publishing wrong-arch images. Also split
go.mod/go.sum into their own layer for module cache reuse and add a
.dockerignore to keep the build context minimal.
Signed-off-by: Guillaume Lours <glours@users.noreply.github.com>1 parent 6c497d1 commit 665f67e
2 files changed
Lines changed: 18 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
1 | 3 | | |
| 4 | + | |
| 5 | + | |
2 | 6 | | |
| 7 | + | |
| 8 | + | |
3 | 9 | | |
4 | | - | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
5 | 14 | | |
6 | 15 | | |
7 | 16 | | |
| |||
0 commit comments