Highly-opinionated (ex-bullshit-free) MTPROTO proxy for Telegram. If you use v1.0 or upgrade broke you proxy, please read the chapter Version 2
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

Dockerfile 961B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. ###############################################################################
  2. # BUILD STAGE
  3. FROM golang:1.26-alpine AS build
  4. ENV CGO_ENABLED=0
  5. RUN --mount=type=cache,target=/var/cache/apk \
  6. set -x \
  7. && apk --update add \
  8. bash \
  9. ca-certificates \
  10. git
  11. COPY go.mod go.sum /app/
  12. WORKDIR /app
  13. RUN go mod download
  14. COPY . /app
  15. RUN set -x \
  16. && version="$(git describe --exact-match HEAD 2>/dev/null || git describe --tags --always)" \
  17. && go build \
  18. -trimpath \
  19. -mod=readonly \
  20. -ldflags="-extldflags '-static' -s -w -X 'main.version=$version'" \
  21. -a \
  22. -tags netgo
  23. ###############################################################################
  24. # PACKAGE STAGE
  25. FROM scratch
  26. ENTRYPOINT ["/mtg"]
  27. CMD ["run", "/config.toml"]
  28. COPY --from=build /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
  29. COPY --from=build /app/mtg /mtg
  30. COPY --from=build /app/example.config.toml /config.toml