You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
818 B
19 lines
818 B
FROM alpine:latest
|
|
RUN apk add --no-cache openssl-dev linux-headers zlib-dev gcc gperf cmake build-base git libstdc++ \
|
|
&& git clone --recursive https://github.com/tdlib/telegram-bot-api.git \
|
|
&& cd telegram-bot-api \
|
|
&& mkdir build \
|
|
&& cd build \
|
|
&& cmake -DCMAKE_BUILD_TYPE=Release .. \
|
|
&& cmake --build . -j 4 --target install \
|
|
&& apk del linux-headers gcc gperf cmake build-base git \
|
|
&& rm -r ./telegram-bot-api
|
|
RUN adduser --no-create-home --uid 2000 --disabled-password tg-bot \
|
|
&& mkdir -p /opt/telegram-bot-api \
|
|
&& chown tg-bot /opt/telegram-bot-api
|
|
|
|
ENV TELEGRAM_API_ID=""
|
|
ENV TELEGRAM_API_HASH=""
|
|
EXPOSE 8081/tcp
|
|
USER tg-bot
|
|
ENTRYPOINT ["/usr/local/bin/telegram-bot-api", "--local", "--dir=/opt/telegram-bot-api", "--http-stat-port=8082", "--log=/opt/telegram-bot-api/api.log", "--verbosity=5"] |