summaryrefslogtreecommitdiff
path: root/bot/Dockerfile
diff options
context:
space:
mode:
authorprospanclaudebot <[email protected]>2026-07-10 22:10:31 +0000
committerprospanclaudebot <[email protected]>2026-07-10 22:10:31 +0000
commit966b62d9bd7e483f1e9484a5a99d8c2db475171c (patch)
treedf3a27730963d68d515272b4246dc79d96945744 /bot/Dockerfile
downloadpacan-git-main.tar.gz
pacan-git-main.zip
initial import: pacan-gitHEADmain
Diffstat (limited to 'bot/Dockerfile')
-rw-r--r--bot/Dockerfile13
1 files changed, 13 insertions, 0 deletions
diff --git a/bot/Dockerfile b/bot/Dockerfile
new file mode 100644
index 0000000..fb89d33
--- /dev/null
+++ b/bot/Dockerfile
@@ -0,0 +1,13 @@
+# сборка Go-бота в статик-бинарь
+FROM golang:1.22-alpine AS build
+WORKDIR /src
+COPY go.mod .
+COPY main.go .
+RUN CGO_ENABLED=0 go build -o /gitbot -ldflags="-s -w" .
+
+FROM alpine:3.20
+RUN apk add --no-cache git ca-certificates tzdata
+COPY --from=build /gitbot /usr/local/bin/gitbot
+ENV REPOS_DIR=/repos
+VOLUME /repos
+ENTRYPOINT ["/usr/local/bin/gitbot"]