yaju-is-always-watching-you/Dockerfile
awayatan e24cf2c2a7
Some checks are pending
CI / test (push) Waiting to run
Bake phrases.yaml into the runtime image
Only config.yaml was bind-mounted into the container, so phrases_file's
default "./phrases.yaml" had nothing to resolve to at runtime and the bot
crash-looped on startup. phrases.yaml is repo-tracked source, not a secret,
so it belongs in the image like the binary itself.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-26 23:44:28 +09:00

14 lines
459 B
Docker

FROM golang:1.26-alpine AS build
WORKDIR /src
COPY go.mod go.sum ./
RUN go mod download
COPY . .
RUN CGO_ENABLED=0 go build -o /out/yaju-keisatsu ./cmd/yaju-is-always-watching-you
FROM alpine:3.20
RUN apk add --no-cache ca-certificates
COPY --from=build /out/yaju-keisatsu /usr/local/bin/yaju-keisatsu
COPY phrases.yaml /etc/yaju-keisatsu/phrases.yaml
EXPOSE 8080
ENTRYPOINT ["/usr/local/bin/yaju-keisatsu"]
CMD ["-config", "/etc/yaju-keisatsu/config.yaml"]