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
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

Dockerfile 917B

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