-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
29 lines (22 loc) · 987 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# Builder
FROM alpine:latest as builder
LABEL Maintainer="[email protected]"
RUN apk add git cmake build-base gperf linux-headers zlib-dev openssl-dev
RUN mkdir -p /telegram-bot-api/build && \
mkdir -p /telegram-bot-api/install && \
git clone --recursive https://github.com/tdlib/telegram-bot-api.git /telegram-bot-api/src
RUN cd /telegram-bot-api/build && \
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/telegram-bot-api/install /telegram-bot-api/src && \
cmake --build . --target install -j`nproc`
# Main image
FROM alpine:latest
LABEL Maintainer="[email protected]"
ENV API_ID=some_env_id \
API_HASH=some_api_hash \
HTTP_PORT=8081
RUN apk add zlib openssl gperf && \
mkdir -p /telegram-bot-api/files /telegram-bot-api/temp
COPY --from=builder /telegram-bot-api/install/bin/telegram-bot-api /telegram-bot-api/
COPY entrypoint.sh /telegram-bot-api/entrypoint.sh
EXPOSE 8081
ENTRYPOINT [ "sh", "/telegram-bot-api/entrypoint.sh" ]