mirror of
https://github.com/teddysun/across.git
synced 2025-10-08 05:45:34 +08:00
Added MTProxy (Telegram Messenger MTProto proxy) Docker Image
This commit is contained in:
30
docker/mtproxy/Dockerfile.architecture
Normal file
30
docker/mtproxy/Dockerfile.architecture
Normal file
@@ -0,0 +1,30 @@
|
||||
# Dockerfile for MTProxy based alpine
|
||||
# Copyright (C) 2020 Teddysun <i@teddysun.com>
|
||||
# Reference URL:
|
||||
# https://github.com/TelegramMessenger/MTProxy
|
||||
|
||||
FROM --platform=${TARGETPLATFORM} alpine:latest AS builder
|
||||
WORKDIR /root
|
||||
COPY patches /root/patches
|
||||
RUN set -ex \
|
||||
&& apk add --no-cache git build-base linux-headers musl-dev openssl-dev zlib-dev \
|
||||
&& git clone https://github.com/TelegramMessenger/MTProxy.git \
|
||||
&& cd MTProxy \
|
||||
&& patch -p0 -i /root/patches/randr_compat.patch \
|
||||
&& make
|
||||
|
||||
FROM --platform=${TARGETPLATFORM} alpine:latest
|
||||
LABEL maintainer="Teddysun <i@teddysun.com>"
|
||||
|
||||
RUN set -ex \
|
||||
&& apk add --no-cache curl tzdata
|
||||
|
||||
COPY entrypoint.sh /
|
||||
COPY --from=builder /root/MTProxy/objs/bin/mtproto-proxy /usr/bin
|
||||
|
||||
ENV TZ=Asia/Shanghai
|
||||
EXPOSE 443 2398
|
||||
VOLUME /data
|
||||
WORKDIR /data
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
CMD [ "--port", "2398", "--http-ports", "443", "--slaves", "2", "--max-special-connections", "60000", "--allow-skip-dh" ]
|
Reference in New Issue
Block a user