forked from alexdoesh/mtproxy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
44 lines (35 loc) · 1.32 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
FROM alpine:3.6
# Uncomment if local sources
# COPY ./MTProxy /mtproxy/sources
COPY ./patches /mtproxy/patches
RUN apk add --no-cache --virtual .build-deps \
git make gcc musl-dev linux-headers openssl-dev \
&& git clone --single-branch --depth 1 https://github.com/TelegramMessenger/MTProxy.git /mtproxy/sources \
&& cd /mtproxy/sources \
&& patch -p0 -i /mtproxy/patches/randr_compat.patch \
&& patch -p1 -i /mtproxy/patches/timeout.patch \
&& make -j$(getconf _NPROCESSORS_ONLN)
# Let's skip all cleaning stuff for faster build
# && cp /mtproxy/sources/objs/bin/mtproto-proxy /mtproxy/ \
# && rm -rf /mtproxy/{sources,patches} \
# && apk add --virtual .rundeps libcrypto1.0 \
# && apk del .build-deps
FROM alpine:3.6
LABEL maintainer="Alex Doe <[email protected]>" \
description="Telegram Messenger MTProto zero-configuration proxy server."
RUN apk add --no-cache curl \
&& ln -s /usr/lib/libcrypto.so.41 /usr/lib/libcrypto.so.1.0.0
# alpine:3.7 will need symlink to libcrypto.so.42
WORKDIR /mtproxy
COPY --from=0 /mtproxy/sources/objs/bin/mtproto-proxy .
COPY docker-entrypoint.sh /
VOLUME /data
EXPOSE 2398 443
ENTRYPOINT ["/docker-entrypoint.sh"]
CMD [ \
"--port", "2398", \
"--http-ports", "443", \
"--slaves", "2", \
"--max-special-connections", "60000", \
"--allow-skip-dh" \
]