2 Commits
Author SHA1 Message Date
didinst 9aea2b2bf6 Upgrade crash latest & edge alpine, skip it
Signed-off-by: Terekhin Alexandr <alex@bearns.me>
2021-04-05 11:37:11 +03:00
didinst 91237441ee Dockerfile: update & upgrade & remove build files
Signed-off-by: Terekhin Alexandr <alex@bearns.me>
2021-04-05 10:42:20 +03:00
2 changed files with 5 additions and 3 deletions
+4 -2
View File
@@ -1,5 +1,6 @@
FROM alpine:latest
RUN apk add --no-cache openssl-dev linux-headers zlib-dev gcc gperf cmake build-base git libstdc++ \
RUN apk update \
&& 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 \
@@ -7,6 +8,7 @@ RUN apk add --no-cache openssl-dev linux-headers zlib-dev gcc gperf cmake build-
&& cmake -DCMAKE_BUILD_TYPE=Release .. \
&& cmake --build . -j 4 --target install \
&& apk del linux-headers gcc gperf cmake build-base git \
&& cd ../.. \
&& rm -r ./telegram-bot-api
RUN adduser --no-create-home --uid 2000 --disabled-password tg-bot \
&& mkdir -p /opt/telegram-bot-api \
@@ -16,4 +18,4 @@ 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"]
ENTRYPOINT ["/usr/local/bin/telegram-bot-api", "--local", "--dir=/opt/telegram-bot-api"]
+1 -1
View File
@@ -1,4 +1,4 @@
#!/bin/bash
docker build -t bearns.me/tg-api .
docker container rm tg-api
docker run --name tg-api --env-file=./tg-bot-api.env -p 8081:8081 -v /tmp:/opt/telegram-bot-api bearns.me/tg-api
docker run --name tg-api --env-file=./tg-bot-api.env -p 8081:8081 bearns.me/tg-api