-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
29 lines (28 loc) · 865 Bytes
/
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
FROM ubuntu:20.04 as compiler
WORKDIR /
RUN apt-get update && apt-get install -y \
git \
curl \
build-essential \
libssl-dev \
zlib1g-dev \
&& rm -rf /var/lib/apt/lists/*
RUN git clone https://github.com/TelegramMessenger/MTProxy
WORKDIR /MTProxy
RUN make
FROM ubuntu:20.04
RUN apt-get update && apt-get install -y \
curl \
cron \
xxd \
openssl \
&& rm -rf /var/lib/apt/lists/*
COPY --from=compiler /MTProxy/objs/bin/mtproto-proxy /usr/bin/mtproto-proxy
RUN mkdir /mtproto-proxy-config
COPY ./mtproxy-config-updater.sh /mtproto-proxy-config/mtproxy-config-updater.sh
RUN chmod +x /mtproto-proxy-config/mtproxy-config-updater.sh
RUN { echo "59 23 * * * /mtproto-proxy-config/mtproxy-config-updater.sh"; } | crontab -
COPY ./entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
EXPOSE 443 8888