From 6a13c38e7773a1775bccd9b5830133d80606c180 Mon Sep 17 00:00:00 2001 From: Joel Wetzell Date: Thu, 4 Dec 2025 16:40:13 -0600 Subject: [PATCH] add dockerfile --- .dockerignore | 1 + Dockerfile | 14 ++++++++++++++ 2 files changed, 15 insertions(+) create mode 100644 .dockerignore create mode 100644 Dockerfile diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..1d1fe94 --- /dev/null +++ b/.dockerignore @@ -0,0 +1 @@ +Dockerfile \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..1d9c04e --- /dev/null +++ b/Dockerfile @@ -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" ] \ No newline at end of file