Files
telegram-gateway/Dockerfile
Gabriel Radureau a6e2ef19b5
All checks were successful
Docker Build / build-and-push-image (push) Successful in 1m19s
Dockerfile: bump golang base 1.23 → 1.24
go-redis bumped go.mod's directive to 1.24 ; builder must match
(otherwise 'go mod download' fails).
2026-05-09 13:59:36 +02:00

23 lines
450 B
Docker

FROM golang:1.24-alpine AS builder
WORKDIR /app
COPY go.mod go.sum ./
RUN go mod download
COPY . .
RUN CGO_ENABLED=0 go build -ldflags="-s -w" -o gateway .
FROM alpine:latest
RUN apk --no-cache add ca-certificates && \
addgroup -g 65532 -S app && \
adduser -u 65532 -S app -G app
WORKDIR /home/app
COPY --from=builder /app/gateway /usr/local/bin/gateway
USER 65532:65532
EXPOSE 8080
ENTRYPOINT ["/usr/local/bin/gateway"]
CMD ["serve"]