-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
26 lines (17 loc) · 856 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
FROM debian:latest
MAINTAINER Sergio Tejón <[email protected]>
ADD ./src /src
WORKDIR /src/tg
RUN apt-get update && apt-get -y install libreadline-dev libconfig-dev libssl-dev lua5.2 liblua5.2-dev libevent-dev libjansson-dev libpython-dev build-essential && \
./configure && \
make
RUN useradd telegramd && \
mkdir /usr/share/telegram-daemon && \
mkdir /usr/share/telegram-daemon/bin && \
cp bin/telegram-cli /usr/share/telegram-daemon/bin/ && \
mkdir /etc/telegram-cli && \
cp server.pub /etc/telegram-cli/server.pub
RUN apt-get purge -y --auto-remove build-essential
ADD ./etc/telegram.conf /etc/telegram-cli
EXPOSE 2391
CMD [ "/usr/share/telegram-daemon/bin/telegram-cli", "-vvvvR", "-k", "/etc/telegram-cli/server.pub", "-W", "-d", "-P", "2391", "--accept-any-tcp", "-c", "/etc/telegram-cli/telegram.conf", "$OUTPUT_MODE" ]