Nik Afiq 9cc29c2329
All checks were successful
CI / test (push) Successful in 5s
CI / build-ai-gateway (push) Successful in 49s
CI / build-ha-gateway (push) Successful in 56s
CI / build-discord-bot (push) Successful in 48s
feat: include ai-gateway in Dockerfiles for discord-bot and ha-gateway
2026-04-21 21:59:45 +09:00

21 lines
493 B
Docker

FROM golang:1.26-alpine AS builder
WORKDIR /workspace
COPY go.work go.work.sum ./
COPY gen/ ./gen/
COPY ai-gateway/ ./ai-gateway/
COPY ha-gateway/ ./ha-gateway/
COPY discord-bot/ ./discord-bot/
WORKDIR /workspace/discord-bot
RUN go mod download
ARG VERSION=dev
RUN CGO_ENABLED=0 GOOS=linux go build \
-ldflags="-s -w -X main.version=${VERSION}" \
-o /discord-bot ./cmd/bot
FROM gcr.io/distroless/static:nonroot
COPY --from=builder /discord-bot /discord-bot
ENTRYPOINT ["/discord-bot"]