|
|
@ -1,14 +1,12 @@ |
|
|
|
FROM alpine:latest |
|
|
|
FROM alpine:latest |
|
|
|
RUN apk update && apk --no-cache upgrade \ |
|
|
|
RUN apk add --no-cache openssl-dev linux-headers zlib-dev gcc gperf cmake build-base git libstdc++ \ |
|
|
|
&& 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 \ |
|
|
|
&& git clone --recursive https://github.com/tdlib/telegram-bot-api.git \ |
|
|
|
&& cd telegram-bot-api \ |
|
|
|
&& cd telegram-bot-api \ |
|
|
|
&& mkdir build \ |
|
|
|
&& mkdir build \ |
|
|
|
&& cd build \ |
|
|
|
&& cd build \ |
|
|
|
&& cmake -DCMAKE_BUILD_TYPE=Release .. \ |
|
|
|
&& cmake -DCMAKE_BUILD_TYPE=Release .. \ |
|
|
|
&& cmake --build . -j 8 --target install \ |
|
|
|
&& cmake --build . -j 4 --target install \ |
|
|
|
&& apk del linux-headers gcc gperf cmake build-base git \ |
|
|
|
&& apk del linux-headers gcc gperf cmake build-base git \ |
|
|
|
&& cd ../.. \ |
|
|
|
|
|
|
|
&& rm -r ./telegram-bot-api |
|
|
|
&& rm -r ./telegram-bot-api |
|
|
|
RUN adduser --no-create-home --uid 2000 --disabled-password tg-bot \ |
|
|
|
RUN adduser --no-create-home --uid 2000 --disabled-password tg-bot \ |
|
|
|
&& mkdir -p /opt/telegram-bot-api \ |
|
|
|
&& mkdir -p /opt/telegram-bot-api \ |
|
|
@ -18,4 +16,4 @@ ENV TELEGRAM_API_ID="" |
|
|
|
ENV TELEGRAM_API_HASH="" |
|
|
|
ENV TELEGRAM_API_HASH="" |
|
|
|
EXPOSE 8081/tcp |
|
|
|
EXPOSE 8081/tcp |
|
|
|
USER tg-bot |
|
|
|
USER tg-bot |
|
|
|
ENTRYPOINT ["/usr/local/bin/telegram-bot-api", "--local", "--dir=/opt/telegram-bot-api"] |
|
|
|
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"] |