Skip to content

Commit b14771d

Browse files
committed
fix(docker): build piguard images locally from public source
The published GHCR packages for go-prompt-injection-guard are private, causing 'unauthorized' pull errors. Switch the compose file to build both the daemon and gateway images locally from the public GitHub repo at v1.0.0. Update docker/README.md to explain the local build behavior.
1 parent 36ff890 commit b14771d

2 files changed

Lines changed: 18 additions & 2 deletions

File tree

docker/README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,12 @@ Both bundled configs (`config.restricted.json` and `config.godmode.json`) set:
275275
The sidecar is internal-only (no host port) and reachable only by the odek containers
276276
over the compose network at `http://piguard-gateway:8080`.
277277

278+
The `piguard` and `piguard-gateway` images are **built locally** from the public
279+
go-prompt-injection-guard source repository (the GHCR packages are private). The first
280+
`docker compose --profile ... up --build` clones the guard repo and compiles both
281+
binaries; after that, the cached `piguard:local` / `piguard-gateway:local` images are
282+
reused.
283+
278284
### One-time model download
279285

280286
The PIGuard model (~735 MB) is **not** baked into the image — it is exported once and

docker/docker-compose.yml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,13 @@ services:
163163
# its existing HTTP-based piguard client without sharing a socket volume.
164164
piguard:
165165
profiles: ["restricted", "godmode", "telegram-restricted", "telegram-godmode"]
166-
image: ghcr.io/backendstack21/go-prompt-injection-guard:v1.0.0
166+
# GHCR packages for this repo are private, so we build the daemon image locally
167+
# from the public source. The first build clones the repo and compiles the
168+
# binary; subsequent starts reuse the cached image.
169+
build:
170+
context: https://github.com/BackendStack21/go-prompt-injection-guard.git#v1.0.0
171+
dockerfile: Dockerfile
172+
image: piguard:local
167173
command:
168174
- "--socket=/run/piguard/piguard.sock"
169175
- "--model-dir=/models"
@@ -182,7 +188,11 @@ services:
182188

183189
piguard-gateway:
184190
profiles: ["restricted", "godmode", "telegram-restricted", "telegram-godmode"]
185-
image: ghcr.io/backendstack21/go-prompt-injection-guard-gateway:v1.0.0
191+
# Built locally from the public guard repo source (GHCR packages are private).
192+
build:
193+
context: https://github.com/BackendStack21/go-prompt-injection-guard.git#v1.0.0
194+
dockerfile: examples/http-gateway/Dockerfile
195+
image: piguard-gateway:local
186196
command: ["--addr=:8080", "--socket=/run/piguard/piguard.sock"]
187197
volumes:
188198
- piguard-sock:/run/piguard

0 commit comments

Comments
 (0)