summaryrefslogtreecommitdiffstats
path: root/Dockerfile
diff options
context:
space:
mode:
Diffstat (limited to 'Dockerfile')
-rw-r--r--Dockerfile16
1 files changed, 16 insertions, 0 deletions
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 0000000..e7bb4a7
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,16 @@
+FROM golang:1.24-alpine AS build
+
+WORKDIR /src
+
+COPY go.mod go.sum ./
+RUN go mod download
+
+COPY . .
+RUN CGO_ENABLED=0 go build -trimpath -ldflags '-s -w' -o /out/cepis-telegram .
+
+FROM gcr.io/distroless/static-debian12:nonroot
+
+COPY --from=build /out/cepis-telegram /cepis-telegram
+
+USER nonroot:nonroot
+ENTRYPOINT ["/cepis-telegram"]