init
This commit is contained in:
+20
@@ -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
|
||||||
@@ -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=
|
||||||
|
```
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
services:
|
||||||
|
tgbotapi:
|
||||||
|
build: .
|
||||||
|
hostname: tgbotapi
|
||||||
|
image: git.shihaam.dev/dockerfiles/tgbotapi
|
||||||
Reference in New Issue
Block a user