add Dockerfile and publish-image workflow for Docker image automation
Build / build (push) Successful in 20s
Publish Docker Image / docker (push) Failing after 1s

This commit is contained in:
Lukas Höppner
2026-05-19 17:32:14 +02:00
parent 1503b68886
commit a0274810aa
3 changed files with 99 additions and 0 deletions
+16
View File
@@ -0,0 +1,16 @@
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"]