tdlib-telegram-bot-api-docker/Dockerfile

14 lines
605 B
Docker
Raw Permalink Normal View History

2020-12-27 20:26:00 +03:00
FROM alpine:latest as buildBase
2021-05-26 11:21:47 +03:00
RUN apk add --no-cache alpine-sdk linux-headers git zlib-dev openssl-dev gperf php cmake
2020-12-27 20:26:00 +03:00
ADD . /srv
WORKDIR /srv
RUN git submodule update --init --recursive && mkdir -p build && cd build && cmake -DCMAKE_INSTALL_PREFIX:PATH=../tdlib -DCMAKE_BUILD_TYPE=Release ..
RUN cd /srv/build && cmake --build . --target install
2021-05-26 11:21:47 +03:00
# RUN upx --best /srv/build/telegram-bot-api
2020-12-27 20:26:00 +03:00
FROM alpine:latest
RUN apk add --no-cache zlib-dev openssl-dev libstdc++
COPY --from=buildBase /srv/build/telegram-bot-api /srv/telegram-bot-api
VOLUME /data
ENTRYPOINT ["/srv/telegram-bot-api", "--dir=/data"]