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
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Dockerfile 1002B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. ###############################################################################
  2. # BUILD STAGE
  3. FROM golang:1.10-alpine
  4. RUN set -x \
  5. && apk --no-cache --update add \
  6. bash \
  7. ca-certificates \
  8. curl \
  9. git \
  10. make \
  11. upx \
  12. && update-ca-certificates
  13. COPY Gopkg.toml Gopkg.lock Makefile /go/src/github.com/9seconds/mtg/
  14. RUN set -x && \
  15. cd /go/src/github.com/9seconds/mtg && \
  16. make -j 4 prepare && \
  17. make vendor
  18. COPY . /go/src/github.com/9seconds/mtg
  19. RUN set -x \
  20. && cd /go/src/github.com/9seconds/mtg \
  21. && make -j 4 static \
  22. && upx --ultra-brute -qq ./mtg
  23. ###############################################################################
  24. # PACKAGE STAGE
  25. FROM scratch
  26. ENTRYPOINT ["/usr/local/bin/mtg"]
  27. ENV MTG_IP=0.0.0.0 \
  28. MTG_PORT=3128 \
  29. MTG_STATS_IP=0.0.0.0 \
  30. MTG_STATS_PORT=3129
  31. EXPOSE 3128 3129
  32. COPY --from=0 /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
  33. COPY --from=0 /go/src/github.com/9seconds/mtg/mtg /usr/local/bin/mtg