From 043af202f201aa72ccc56571b13729e273976587 Mon Sep 17 00:00:00 2001 From: SomesH S Date: Thu, 9 Dec 2021 10:52:04 +0530 Subject: [PATCH 1/2] 'submodule update' in Dockerfile target - api --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 2bcc30a..97ffefb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,7 +12,7 @@ RUN apt-get update && apt-get upgrade -y && \ apt-get clean && rm -rf /var/lib/apt/lists/* WORKDIR /root RUN git clone --recursive https://github.com/tdlib/telegram-bot-api.git && cd telegram-bot-api && \ - git checkout e9587a0 && mkdir build && cd build && \ + git checkout e9587a0 && git submodule update && mkdir build && cd build && \ CXXFLAGS="-stdlib=libc++" CC=/usr/bin/clang-10 CXX=/usr/bin/clang++-10 \ cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX:PATH=.. .. && \ cmake --build . --target install -- -j $(nproc) && cd .. && \ From 2b337fa498a7b2fa15c531866c2ea4b6cc9f62d7 Mon Sep 17 00:00:00 2001 From: SomesH S Date: Thu, 9 Dec 2021 11:06:06 +0530 Subject: [PATCH 2/2] remove redundant 'apt-get clean' in Dockerfile --- Dockerfile | 8 ++++---- tgmb/__init__.py | 1 - 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 97ffefb..9732ac8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,14 +2,14 @@ FROM ubuntu:latest as base ENV DEBIAN_FRONTEND='noninteractive' RUN apt-get update && apt-get upgrade -y && \ apt-get install -y aria2 curl ffmpeg jq libc++-dev locales nano pv python3 python3-pip python3-lxml tzdata && \ - apt-get clean && rm -rf /var/lib/apt/lists/* + rm -rf /var/lib/apt/lists/* RUN locale-gen en_US.UTF-8 FROM ubuntu:latest as api ENV DEBIAN_FRONTEND='noninteractive' RUN apt-get update && apt-get upgrade -y && \ apt-get install -y git gperf make cmake clang-10 libc++-dev libc++abi-dev libssl-dev zlib1g-dev && \ - apt-get clean && rm -rf /var/lib/apt/lists/* + rm -rf /var/lib/apt/lists/* WORKDIR /root RUN git clone --recursive https://github.com/tdlib/telegram-bot-api.git && cd telegram-bot-api && \ git checkout e9587a0 && git submodule update && mkdir build && cd build && \ @@ -24,7 +24,7 @@ RUN apt-get update && apt-get upgrade -y && \ apt-get install -y autoconf automake gcc g++ git libtool make python3 python3-dev python3-distutils python3-pip && \ apt-get install -y libc-ares-dev libcrypto++-dev libcurl4-openssl-dev libfreeimage-dev libsodium-dev && \ apt-get install -y libsqlite3-dev libssl-dev swig zlib1g-dev && \ - apt-get clean && rm -rf /var/lib/apt/lists/* + rm -rf /var/lib/apt/lists/* WORKDIR /root RUN git clone https://github.com/meganz/sdk.git mega-sdk/ && cd mega-sdk/ && \ git checkout v3.9.10 && \ @@ -49,7 +49,7 @@ RUN apt-get update && apt-get upgrade -y && \ apt-get install -y qbittorrent-nox && \ apt-get purge -y software-properties-common && \ apt-get autoremove -y && \ - apt-get clean && rm -rf /var/lib/apt/lists/* + rm -rf /var/lib/apt/lists/* RUN pip3 install --no-cache-dir /root/mega-sdk/bindings/python/dist/megasdk-*.whl WORKDIR /usr/src/app RUN chmod 777 /usr/src/app diff --git a/tgmb/__init__.py b/tgmb/__init__.py index 3caad46..0e74775 100644 --- a/tgmb/__init__.py +++ b/tgmb/__init__.py @@ -5,7 +5,6 @@ # TODO: code for direct link generation # TODO: add hard-restart (restart all subprocesses) # TODO: decide between confDefaults and optVals for AriaHelper, QbitTorrentHelper -# TODO: remove redundant 'apt-get clean' in Dockerfile import aria2p import asyncio import googleapiclient.discovery