add dockerfile

This commit is contained in:
Joel Wetzell
2025-12-04 16:40:13 -06:00
parent 1a8ccfc64a
commit 6a13c38e77
2 changed files with 15 additions and 0 deletions

1
.dockerignore Normal file
View File

@@ -0,0 +1 @@
Dockerfile

14
Dockerfile Normal file
View File

@@ -0,0 +1,14 @@
ARG GO_VERSION=1.25.3
FROM golang:${GO_VERSION}-alpine AS build
RUN apk --no-cache add ca-certificates tzdata
WORKDIR /build
COPY go.mod go.sum ./
RUN go mod download
COPY . .
RUN CGO_ENABLED=0 GOOS=linux go build ./cmd/showbridge
FROM scratch
COPY --from=build /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
COPY --from=build /usr/share/zoneinfo /usr/share/zoneinfo
COPY --from=build /build/showbridge /app/showbridge
ENTRYPOINT [ "/app/showbridge" ]