aboutsummaryrefslogtreecommitdiff
path: root/tdlib.Dockerfile
diff options
context:
space:
mode:
authorBohdan Horbeshko <bodqhrohro@gmail.com>2024-04-28 14:04:42 +0300
committerBohdan Horbeshko <bodqhrohro@gmail.com>2024-04-28 14:04:42 +0300
commit43f9603b887a2395a9a14234bd078170b3bd0926 (patch)
tree57f8f8b40450f19b34b825acd0516dee5278b41c /tdlib.Dockerfile
parent154b59de44d305c17b4e0228e62eca0a408558ed (diff)
parenta3f6d5f77402bf4a4d3fa01297f9fd78cc69a3b3 (diff)
Merge branch 'master' into adhoc
Diffstat (limited to 'tdlib.Dockerfile')
-rw-r--r--tdlib.Dockerfile23
1 files changed, 23 insertions, 0 deletions
diff --git a/tdlib.Dockerfile b/tdlib.Dockerfile
new file mode 100644
index 0000000..5774405
--- /dev/null
+++ b/tdlib.Dockerfile
@@ -0,0 +1,23 @@
+FROM golang:1.19-bullseye AS base
+
+RUN apt-get update
+RUN apt-get install -y libssl-dev cmake build-essential gperf libz-dev make git php
+
+FROM base AS tdlib
+
+ARG TD_COMMIT
+ARG MAKEOPTS
+RUN git clone https://github.com/tdlib/td /src/
+RUN git -C /src/ checkout "${TD_COMMIT}"
+RUN mkdir build
+WORKDIR /build/
+RUN cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/compiled/ /src/
+RUN cmake --build . --target prepare_cross_compiling ${MAKEOPTS}
+WORKDIR /src/
+RUN php SplitSource.php
+WORKDIR /build/
+RUN cmake --build . ${MAKEOPTS}
+RUN make install
+
+FROM scratch AS binaries
+COPY --from=tdlib /compiled/ /