21 lines
493 B
Docker
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"]
|