Commit d984eaf
committed
fix(docker): vendor arch-safe PIGuard daemon build
The upstream go-prompt-injection-guard Dockerfile pins its base images by
amd64-only sha256 digests, so building the remote git context on Apple
Silicon produces x86-64 binaries (piguard-server, libonnxruntime.so)
inside an arm64-labeled image and the container crash-loops with
"rosetta error: failed to open elf at /lib64/ld-linux-x86-64.so.2".
Vendor the daemon build in docker/piguard-daemon/Dockerfile: it compiles
the pinned upstream v1.0.0 source (git clone --branch v1.0.0) with
unpinned base image tags, which resolve to the host architecture. The
upstream Makefile is arch-aware and selects the aarch64 ONNX Runtime
when GOARCH=arm64, so the resulting image contains native binaries
(verified: ELF e_machine b7 = EM_AARCH64 for both the server binary and
libonnxruntime.so; container reaches healthy and correctly labels
BENIGN/INJECTION through the gateway).
This replaces the manual Apple Silicon workaround documented in PR #85.1 parent 8275f7f commit d984eaf
2 files changed
Lines changed: 62 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
162 | 162 | | |
163 | 163 | | |
164 | 164 | | |
165 | | - | |
166 | | - | |
167 | | - | |
168 | | - | |
169 | | - | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
170 | 169 | | |
171 | 170 | | |
172 | 171 | | |
173 | | - | |
174 | | - | |
| 172 | + | |
| 173 | + | |
175 | 174 | | |
176 | | - | |
177 | | - | |
| 175 | + | |
178 | 176 | | |
179 | 177 | | |
180 | 178 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
0 commit comments