From e48b026e3f0d30b829406a1b00ad2e490ca705b2 Mon Sep 17 00:00:00 2001 From: Shihaam Abdul Rahman Date: Sat, 5 Sep 2026 00:37:05 +0500 Subject: [PATCH] init --- Dockerfile | 20 ++++++++++++++++++++ README.md | 21 +++++++++++++++++++++ compose.yml | 5 +++++ 3 files changed, 46 insertions(+) create mode 100644 Dockerfile create mode 100644 README.md create mode 100644 compose.yml diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..0e47c98 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,20 @@ +FROM debian:stable-slim AS build + +RUN apt update \ + && apt upgrade -y \ + && apt install -y make git zlib1g-dev libssl-dev gperf cmake clang libc++-dev libc++abi-dev + +WORKDIR /root +RUN git clone --recursive https://github.com/tdlib/telegram-bot-api.git \ + && rm -rf telegram-bot-api/build \ + && mkdir telegram-bot-api/build + +WORKDIR /root/telegram-bot-api/build +RUN CXXFLAGS="-stdlib=libc++" CC=/usr/bin/clang CXX=/usr/bin/clang++ cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX:PATH=/usr/local .. \ + && cmake --build . --target install + +FROM debian:stable-slim + +COPY --from=build /usr/local/bin/telegram-bot-api /usr/local/bin/telegram-bot-api + +CMD /usr/local/bin/telegram-bot-api diff --git a/README.md b/README.md new file mode 100644 index 0000000..74f4501 --- /dev/null +++ b/README.md @@ -0,0 +1,21 @@ +## Telegram Bot API + + +### build +```bash +docker compose build +``` + + +### Run on server +```bash +services: + tgbotapi: + hostname: tgbotapi + image: git.shihaam.dev/dockerfiles/tgbotapi + ports: + - 8080:8080 + environment: + - TELEGRAM_API_ID= + - TELEGRAM_API_HASH= +``` diff --git a/compose.yml b/compose.yml new file mode 100644 index 0000000..e090e92 --- /dev/null +++ b/compose.yml @@ -0,0 +1,5 @@ +services: + tgbotapi: + build: . + hostname: tgbotapi + image: git.shihaam.dev/dockerfiles/tgbotapi