From a2cdc8211bf1ebd4d1ba0cf5e3ace559493dfad3 Mon Sep 17 00:00:00 2001 From: Ali Mihandoost Date: Wed, 8 Nov 2023 03:16:49 +0330 Subject: [PATCH] feat: tdlib --- .github/workflows/publish-container.yml | 6 ++++ tdlib/.dockerignore | 1 + tdlib/Dockerfile | 43 +++++++++++++++++++++++++ tdlib/README.md | 3 ++ 4 files changed, 53 insertions(+) create mode 100644 tdlib/.dockerignore create mode 100644 tdlib/Dockerfile create mode 100644 tdlib/README.md diff --git a/.github/workflows/publish-container.yml b/.github/workflows/publish-container.yml index 09bfa5b..7fe7281 100644 --- a/.github/workflows/publish-container.yml +++ b/.github/workflows/publish-container.yml @@ -62,6 +62,12 @@ jobs: short: 6 full: 6.3-php8.2-fpm + - name: tdlib + path: tdlib + version: + short: 1 + full: 1.8.0 + permissions: contents: read packages: write diff --git a/tdlib/.dockerignore b/tdlib/.dockerignore new file mode 100644 index 0000000..72e8ffc --- /dev/null +++ b/tdlib/.dockerignore @@ -0,0 +1 @@ +* diff --git a/tdlib/Dockerfile b/tdlib/Dockerfile new file mode 100644 index 0000000..f6a44b9 --- /dev/null +++ b/tdlib/Dockerfile @@ -0,0 +1,43 @@ +FROM ghcr.io/alwatr/alpine:3.17 + +ARG TDLIB_VERSION=1.8.0 +RUN set -ex; \ + apk add --no-cache --virtual .build-deps \ + curl \ + ca-certificates \ + g++ \ + make \ + cmake \ + gperf \ + libressl-dev \ + zlib-dev \ + zlib-static \ + linux-headers; \ + mkdir /tmp/td/ && cd /tmp/td/; \ + curl -sSLo tdlib.tar.gz https://github.com/tdlib/td/archive/refs/tags/v${TDLIB_VERSION}.tar.gz; \ + tar -xzvf tdlib.tar.gz && cd td-${TDLIB_VERSION}; \ + mkdir build && cd build; \ + cmake -DCMAKE_BUILD_TYPE=Release -DTD_ENABLE_LTO=ON ..; \ + ls -lAhFtr; \ + cmake --build . --target install -j 4; \ + ls -lAhFtr; \ + make install; \ + ls -lAhFtr /usr/local/lib/; \ + apk del .build-deps; \ + rm -rfv /tmp/td/; + +ARG BUILD_REV +ARG BUILD_DATE +LABEL org.opencontainers.image.title="alwatr/tdlib" \ + org.opencontainers.image.description="A library to access Telegram database, written in C++ and cross-platform, packaged by Alwatr." \ + org.opencontainers.image.base.name="ghcr.io/alwatr/alpine:3.17" \ + org.opencontainers.image.version="1.8.0" \ + org.opencontainers.image.ref.name="1.8.0" \ + org.opencontainers.image.licenses="MIT" \ + org.opencontainers.image.created=${BUILD_DATE} \ + org.opencontainers.image.revision=${BUILD_REV} \ + org.opencontainers.image.vendor="Alwatr" \ + org.opencontainers.image.source="https://github.com/Alwatr/containers/tree/main/tdlib" \ + org.opencontainers.image.url="https://github.com/Alwatr/containers/tree/main/tdlib" \ + org.opencontainers.image.documentation="https://github.com/Alwatr/containers/tree/main/tdlib" \ + org.opencontainers.image.authors="S. Ali Mihandoost (https://ali.mihandoost.com), S. Amir Mohammad Najafi (https://njfamirm.ir/)" diff --git a/tdlib/README.md b/tdlib/README.md new file mode 100644 index 0000000..84b3dc0 --- /dev/null +++ b/tdlib/README.md @@ -0,0 +1,3 @@ +# Alwatr Telegram Database Library Container + +A library to access Telegram database, written in C++ and cross-platform, packaged by Alwatr.