build(gl): require Go 1.26

This commit is contained in:
2026-08-14 23:15:07 +03:30
parent 8ba5d6cef8
commit ce5f8b4a84
2 changed files with 37 additions and 1 deletions
+36
View File
@@ -0,0 +1,36 @@
# syntax=docker/dockerfile:1
FROM golang:1.26-bookworm AS builder
WORKDIR /src
ARG GO_PROXY=https://go.reg.darano.ir
ENV GOPROXY="$GO_PROXY"
ENV CGO_ENABLED=0
COPY go.mod go.sum ./
RUN --mount=type=cache,target=/go/pkg/mod,sharing=locked \
go mod download
COPY . .
RUN --mount=type=cache,target=/go/pkg/mod,sharing=locked \
--mount=type=cache,target=/root/.cache/go-build,sharing=locked \
go build -trimpath -ldflags="-s -w" -o /out/gl ./cmd/gl
FROM alpine:3.24.1
RUN apk add --no-cache ca-certificates \
&& addgroup -S darano \
&& adduser -S -G darano darano
WORKDIR /app
COPY --from=builder /out/gl /app/gl
COPY gl.cfg.toml /app/gl.cfg.toml
USER darano
EXPOSE 8600
ENTRYPOINT ["/app/gl"]
CMD ["-conf", "/app/gl.cfg.toml"]
+1 -1
View File
@@ -1,6 +1,6 @@
module gl module gl
go 1.24 go 1.26
require ( require (
github.com/jackc/pgx/v5 v5.4.3 github.com/jackc/pgx/v5 v5.4.3