2020-11-06 01:42:25 +01:00
|
|
|
FROM alpine:3.12.1 as builder
|
|
|
|
|
|
|
|
RUN apk --no-cache add \
|
|
|
|
build-base \
|
|
|
|
cmake \
|
|
|
|
openssl-dev \
|
|
|
|
zlib-dev \
|
|
|
|
gperf \
|
|
|
|
linux-headers
|
|
|
|
|
|
|
|
COPY . /src
|
|
|
|
|
|
|
|
WORKDIR /src/build
|
|
|
|
|
|
|
|
RUN cmake -DCMAKE_BUILD_TYPE=Release ..
|
|
|
|
RUN cmake --build . --target install --
|
|
|
|
|
|
|
|
FROM alpine:3.12.1
|
|
|
|
|
2020-11-08 13:40:45 +01:00
|
|
|
RUN apk --no-cache add libstdc++ curl
|
2020-11-06 01:42:25 +01:00
|
|
|
|
|
|
|
COPY --from=builder /usr/local/bin/telegram-bot-api /usr/local/bin/telegram-bot-api
|
2020-11-08 13:40:45 +01:00
|
|
|
COPY docker-entrypoint.sh /docker-entrypoint.sh
|
2020-11-06 01:42:25 +01:00
|
|
|
|
|
|
|
HEALTHCHECK CMD curl -f http://localhost:8082/ || exit 1
|
|
|
|
|
2020-11-08 13:40:45 +01:00
|
|
|
ENTRYPOINT ["/docker-entrypoint.sh"]
|