Files
glpi-neuroforge-mega/services/agent/Dockerfile
jbergner a6bc71fb3a
Some checks failed
release-tag / Resolve release metadata (push) Successful in 30s
release-tag / Build knowledge (push) Failing after 4m51s
release-tag / Build control (push) Failing after 5m0s
release-tag / Build agent (push) Failing after 5m0s
release-tag / Build agent-data-init (push) Failing after 5m5s
release-tag / Build neuroforge-worker (push) Failing after 5m7s
release-tag / Build neuroforge (push) Failing after 5m9s
Init
2026-08-26 18:34:41 +02:00

21 lines
707 B
Docker

FROM golang:1.26-alpine AS build
WORKDIR /src
COPY go.mod ./
COPY cmd ./cmd
COPY internal ./internal
RUN CGO_ENABLED=0 GOOS=linux go build -trimpath -ldflags="-s -w" -o /out/glpi-ai-agent ./cmd/agent
# One-shot helper used by docker compose to prepare the persistent volume for
# the distroless non-root runtime user (UID/GID 65532).
FROM golang:1.26-alpine AS data-init
ENTRYPOINT ["sh", "-c", "mkdir -p /app/data && chown -R 65532:65532 /app/data && chmod 0750 /app/data"]
FROM gcr.io/distroless/static-debian12:nonroot
WORKDIR /app
COPY --from=build /out/glpi-ai-agent /app/glpi-ai-agent
COPY knowledge /app/knowledge
VOLUME ["/app/data"]
EXPOSE 8080
USER 65532:65532
ENTRYPOINT ["/app/glpi-ai-agent"]