Compare commits

...

3 Commits

Author SHA1 Message Date
Terekhin Alexandr e6be446e3f
Update readme, use more threads on build 3 years ago
Terekhin Alexandr bc151661ab Update 'README.md' 4 years ago
Terekhin Alexandr 91237441ee Dockerfile: update & upgrade & remove build files 4 years ago
  1. 6
      Dockerfile
  2. 6
      README.md

@ -1,12 +1,14 @@
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 --no-cache upgrade \
&& 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 \
&& cd build \
&& cmake -DCMAKE_BUILD_TYPE=Release .. \
&& cmake --build . -j 4 --target install \
&& cmake --build . -j 8 --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 \

@ -18,6 +18,10 @@ Or build manualy: `docker build -t <you image name> .`
And run it:
`docker run -p <host port>:8081 --name <you container name> --env-file=./tg-bot-api.env <you image name>`
## This image on dockerhub
Built for linux OS amd64 and arm/v7 arch https://hub.docker.com/r/bearns/tg-bot-api-server
## Crossbuild
Use qemu and buildx if you need it.
@ -27,8 +31,6 @@ Get buidlx here https://github.com/docker/buildx
Buildix documentation here https://docs.docker.com/buildx/working-with-buildx/
Run image
`docker run --privileged --rm docker/binfmt`
Or (alternative)
`docker run --privileged --rm multiarch/qemu-user-static:latest`
Create profile (linux/arm/v7 used as example)

Loading…
Cancel
Save