konfachcloud-discord-bot/Dockerfile

21 lines
552 B
Text
Raw Permalink Normal View History

2024-06-27 13:45:32 +00:00
FROM golang:1.22 as builder
WORKDIR /app
COPY go.mod ./
COPY go.sum ./
RUN --mount=type=cache,mode=0777,target=/go/pkg/mod go mod download all
COPY ./cmd ./cmd
COPY ./src ./src
RUN --mount=type=cache,mode=0777,target=/go/pkg/mod CGO_ENABLED=0 go build -tags timetzdata -o /konfachcloud-discord-bot ./cmd/bot/main.go
FROM scratch
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
COPY --from=builder /konfachcloud-discord-bot /konfachcloud-discord-bot
2024-06-27 14:01:09 +00:00
VOLUME /data
2024-06-27 13:45:32 +00:00
ENTRYPOINT ["/konfachcloud-discord-bot"]