mirror of
https://github.com/PaiGramTeam/telegram-bot-api-build.git
synced 2024-11-21 22:48:07 +00:00
Try with minimized CPU count
This commit is contained in:
parent
feb59875fd
commit
d707a8c8e0
@ -5,10 +5,11 @@ WORKDIR /usr/src/telegram-bot-api
|
|||||||
|
|
||||||
RUN apk add --no-cache --update alpine-sdk linux-headers git zlib-dev openssl-dev gperf cmake
|
RUN apk add --no-cache --update alpine-sdk linux-headers git zlib-dev openssl-dev gperf cmake
|
||||||
COPY telegram-bot-api /usr/src/telegram-bot-api
|
COPY telegram-bot-api /usr/src/telegram-bot-api
|
||||||
|
ARG nproc=1
|
||||||
RUN mkdir -p build \
|
RUN mkdir -p build \
|
||||||
&& cd build \
|
&& cd build \
|
||||||
&& cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX:PATH=.. .. \
|
&& cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX:PATH=.. .. \
|
||||||
&& cmake --build . --target install -j $(nproc) \
|
&& cmake --build . --target install -j ${nproc} \
|
||||||
&& strip /usr/src/telegram-bot-api/bin/telegram-bot-api
|
&& strip /usr/src/telegram-bot-api/bin/telegram-bot-api
|
||||||
|
|
||||||
FROM alpine:3.18
|
FROM alpine:3.18
|
||||||
|
2
Makefile
2
Makefile
@ -5,7 +5,7 @@ image_tag := $(shell date +%Y%m%d)
|
|||||||
build:
|
build:
|
||||||
rm -rf telegram-bot-api
|
rm -rf telegram-bot-api
|
||||||
git clone --recursive https://github.com/tdlib/telegram-bot-api.git
|
git clone --recursive https://github.com/tdlib/telegram-bot-api.git
|
||||||
docker build -t $(image_name):$(image_tag) .
|
docker build -t $(image_name):$(image_tag) --build-arg nproc=$(shell nproc) .
|
||||||
docker tag $(image_name):$(image_tag) $(image_name):latest
|
docker tag $(image_name):$(image_tag) $(image_name):latest
|
||||||
|
|
||||||
.PHONY: publish
|
.PHONY: publish
|
||||||
|
Loading…
Reference in New Issue
Block a user