-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
37 lines (31 loc) · 932 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
30
31
32
33
34
35
36
37
FROM php:5.6.40-cli-alpine
ARG TG_VERSION=6547c0b
LABEL maintainer="cnxzcxy <[email protected]>"
LABEL version=1.3.1
WORKDIR /usr/src/build
RUN apk add --no-cache \
jansson-dev \
libconfig-dev \
libevent-dev \
lua-dev \
openssl-dev \
readline-dev \
&& apk add --no-cache --virtual .build-deps \
build-base \
curl \
git \
zlib-dev \
&& git clone https://github.com/vysheng/tg \
&& cd tg \
&& git submodule update --init --recursive --force \
&& ./configure \
&& make \
&& apk del .build-deps \
&& mv /usr/src/build/tg/bin/telegram-cli /usr/bin/telegram-cli \
&& mkdir /etc/telegram-cli \
&& mv server.pub /etc/telegram-cli/server.pub \
&& rm -rf /usr/src/build \
&& addgroup -g 1000 telegram \
&& adduser -u 1000 -G telegram -s /bin/sh -D telegram
WORKDIR /
CMD ["telegram-cli --json -P 3345"]