From 3ae27c435d644749fd085356ff628b5113fd26f2 Mon Sep 17 00:00:00 2001 From: Astra Date: Sun, 13 Sep 2026 20:57:32 +0100 Subject: [PATCH] container: build and ship cmd/createuser in the server image Mirrors the telesrv-admin pattern - a static build stage compile, copied into the final alpine image as /app/createuser - so the tool is available wherever the server image runs, not just from a local go run. --- Containerfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Containerfile b/Containerfile index dfc6f69b..149dfe07 100644 --- a/Containerfile +++ b/Containerfile @@ -18,12 +18,14 @@ RUN CGO_ENABLED=0 go build -trimpath \ -ldflags "-X main.gitCommit=${GIT_COMMIT} -X main.gitBranch=${GIT_BRANCH} -X main.gitTreeState=${GIT_TREE_STATE} -X main.buildTime=${BUILD_TIME}" \ -o /out/gramsrv ./cmd/telesrv RUN CGO_ENABLED=0 go build -trimpath -o /out/telesrv-admin ./cmd/telesrv-admin +RUN CGO_ENABLED=0 go build -trimpath -o /out/createuser ./cmd/createuser FROM docker.io/library/alpine:3.20 RUN apk add --no-cache ca-certificates tzdata ffmpeg WORKDIR /app COPY --from=build /out/gramsrv /app/gramsrv COPY --from=build /out/telesrv-admin /app/telesrv-admin +COPY --from=build /out/createuser /app/createuser COPY --from=build /src/data/langpack /app/data/langpack COPY --from=build /src/data/sticker-seed /app/data/sticker-seed EXPOSE 2398 2600