Files
discord-thread-bot-go/Dockerfile
T
Lukas Höppner a0274810aa
Build / build (push) Successful in 20s
Publish Docker Image / docker (push) Failing after 1s
add Dockerfile and publish-image workflow for Docker image automation
2026-05-19 17:32:14 +02:00

17 lines
379 B
Docker

FROM golang:1.23-alpine AS builder
WORKDIR /src
COPY go.mod go.sum ./
RUN go mod download
COPY . .
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -trimpath -ldflags="-s -w" -o /out/discord-thread-bot .
FROM gcr.io/distroless/static-debian12:nonroot
WORKDIR /app
COPY --from=builder /out/discord-thread-bot /app/discord-thread-bot
ENTRYPOINT ["/app/discord-thread-bot"]