From 11e34c67ee313c7888aef6469d647bd90f789f6c Mon Sep 17 00:00:00 2001 From: SomesH S Date: Sat, 3 Dec 2022 10:45:05 +0530 Subject: [PATCH 01/13] Dockerfile - remove intermediate FROM steps --- Dockerfile | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 543ad38..a5be2eb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -26,12 +26,9 @@ RUN cd sdk && rm -rf .git && mv ../ac-m4-py.patch ./ && git apply ac-m4-py.patch make -j $(nproc) && cd bindings/python/ && python3 setup.py bdist_wheel && \ ls -lh dist/megasdk* -FROM ghcr.io/ksssomesh12/tgmb-beta:api as app-api -FROM ghcr.io/ksssomesh12/tgmb-beta:sdk as app-sdk - FROM ubuntu:jammy as app -COPY --from=app-api /root/api/bin/telegram-bot-api /usr/bin/telegram-bot-api -COPY --from=app-sdk /root/sdk /root/sdk +COPY --from=api /root/api/bin/telegram-bot-api /usr/bin/telegram-bot-api +COPY --from=sdk /root/sdk /root/sdk ENV DEBIAN_FRONTEND='noninteractive' ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' TZ='Asia/Kolkata' RUN apt-get update && apt-get upgrade -y && \ From 37a3314646b21091f8857aea5be76f826ec33751 Mon Sep 17 00:00:00 2001 From: SomesH S Date: Sat, 3 Dec 2022 10:45:31 +0530 Subject: [PATCH 02/13] refactor .github/workflows/*.yml --- .github/workflows/build-docker-image.yml | 118 ++++++++--------------- .github/workflows/github-release.yml | 2 - .github/workflows/pypi-release.yml | 3 - 3 files changed, 41 insertions(+), 82 deletions(-) diff --git a/.github/workflows/build-docker-image.yml b/.github/workflows/build-docker-image.yml index 7bb0a7c..2c0d52d 100644 --- a/.github/workflows/build-docker-image.yml +++ b/.github/workflows/build-docker-image.yml @@ -6,84 +6,54 @@ jobs: build-api: runs-on: ubuntu-latest steps: - - name: Login to GitHub Container Registry + - name: Login to Docker Hub uses: docker/login-action@v2.1.0 with: - registry: ghcr.io - username: ksssomesh12 - password: ${{ secrets.GH_PACKAGES_TOKEN }} - + registry: docker.io + username: sssomeshhh + password: ${{ secrets.DOCKER_HUB_TOKEN }} - name: Setup Docker Buildx id: setup_buildx uses: docker/setup-buildx-action@v2.2.1 - - - name: Cache Docker Layers - id: cache_docker_layers - uses: actions/cache@v3.0.11 - with: - path: /tmp/.buildx-cache - key: ${{ runner.os }}-buildx-tgmb-api-${{ github.sha }} - restore-keys: ${{ runner.os }}-buildx-tgmb-api- - - - name: Build-Push Docker Image - id: docker_build_push + - name: Build Load 'api' + id: docker_load_api uses: docker/build-push-action@v3.2.0 with: builder: ${{ steps.setup_buildx.outputs.name }} target: api - cache-from: type=local,src=/tmp/.buildx-cache - cache-to: type=local,dest=/tmp/.buildx-cache-new - push: true - tags: ghcr.io/ksssomesh12/tgmb-beta:api - - - name: Docker Image Digest - run: echo ${{ steps.docker_build_push.outputs.digest }} - - - name: Move Docker Layer Cache - run: | - rm -rf /tmp/.buildx-cache - mv /tmp/.buildx-cache-new /tmp/.buildx-cache + cache-from: | + type=registry,ref=sssomeshhh/cache:tgmb-api-master + type=registry,ref=sssomeshhh/cache:tgmb-api-${{ github.ref_name }} + cache-to: | + type=registry,ref=sssomeshhh/cache:tgmb-api-${{ github.ref_name }} + load: false + push: false build-sdk: runs-on: ubuntu-latest steps: - - name: Login to GitHub Container Registry + - name: Login to Docker Hub uses: docker/login-action@v2.1.0 with: - registry: ghcr.io - username: ksssomesh12 - password: ${{ secrets.GH_PACKAGES_TOKEN }} - + registry: docker.io + username: sssomeshhh + password: ${{ secrets.DOCKER_HUB_TOKEN }} - name: Setup Docker Buildx id: setup_buildx uses: docker/setup-buildx-action@v2.2.1 - - - name: Cache Docker Layers - id: cache_docker_layers - uses: actions/cache@v3.0.11 - with: - path: /tmp/.buildx-cache - key: ${{ runner.os }}-buildx-tgmb-sdk-${{ github.sha }} - restore-keys: ${{ runner.os }}-buildx-tgmb-sdk- - - - name: Build-Push Docker Image - id: docker_build_push + - name: Build Load 'sdk' + id: docker_load_sdk uses: docker/build-push-action@v3.2.0 with: builder: ${{ steps.setup_buildx.outputs.name }} target: sdk - cache-from: type=local,src=/tmp/.buildx-cache - cache-to: type=local,dest=/tmp/.buildx-cache-new - push: true - tags: ghcr.io/ksssomesh12/tgmb-beta:sdk - - - name: Docker Image Digest - run: echo ${{ steps.docker_build_push.outputs.digest }} - - - name: Move Docker Layer Cache - run: | - rm -rf /tmp/.buildx-cache - mv /tmp/.buildx-cache-new /tmp/.buildx-cache + cache-from: | + type=registry,ref=sssomeshhh/cache:tgmb-sdk-master + type=registry,ref=sssomeshhh/cache:tgmb-sdk-${{ github.ref_name }} + cache-to: | + type=registry,ref=sssomeshhh/cache:tgmb-sdk-${{ github.ref_name }} + load: false + push: false build-app: runs-on: ubuntu-latest @@ -95,36 +65,30 @@ jobs: registry: ghcr.io username: ksssomesh12 password: ${{ secrets.GH_PACKAGES_TOKEN }} - + - name: Login to Docker Hub + uses: docker/login-action@v2.1.0 + with: + registry: docker.io + username: sssomeshhh + password: ${{ secrets.DOCKER_HUB_TOKEN }} - name: Setup Docker Buildx id: setup_buildx uses: docker/setup-buildx-action@v2.2.1 - - - name: Cache Docker Layers - id: cache_docker_layers - uses: actions/cache@v3.0.11 - with: - path: /tmp/.buildx-cache - key: ${{ runner.os }}-buildx-tgmb-app-${{ github.sha }} - restore-keys: ${{ runner.os }}-buildx-tgmb-app- - - - name: Build-Push Docker Image + - name: Build Push Docker Image id: docker_build_push uses: docker/build-push-action@v3.2.0 with: builder: ${{ steps.setup_buildx.name }} target: app - cache-from: type=local,src=/tmp/.buildx-cache - cache-to: type=local,dest=/tmp/.buildx-cache-new + cache-from: | + type=registry,ref=sssomeshhh/cache:tgmb-api-${{ github.ref_name }} + type=registry,ref=sssomeshhh/cache:tgmb-sdk-${{ github.ref_name }} + type=registry,ref=sssomeshhh/cache:tgmb-app-master + type=registry,ref=sssomeshhh/cache:tgmb-app-${{ github.ref_name }} + cache-to: | + type=registry,ref=sssomeshhh/cache:tgmb-app-${{ github.ref_name }} + load: false push: true tags: | ghcr.io/ksssomesh12/tgmb-beta:${{ github.sha }} ghcr.io/ksssomesh12/tgmb-beta:${{ github.ref_name }} - - - name: Docker Image Digest - run: echo ${{ steps.docker_build_push.outputs.digest }} - - - name: Move Docker Layer Cache - run: | - rm -rf /tmp/.buildx-cache - mv /tmp/.buildx-cache-new /tmp/.buildx-cache diff --git a/.github/workflows/github-release.yml b/.github/workflows/github-release.yml index f0bbb84..963113e 100644 --- a/.github/workflows/github-release.yml +++ b/.github/workflows/github-release.yml @@ -29,13 +29,11 @@ jobs: uses: actions/checkout@v3 with: submodules: recursive - - name: Create Package id: create_package run: | rm -rvf ./deploy/.git* tar -cvf deploy.tar deploy - - name: Upload Package id: upload_package uses: softprops/action-gh-release@v1 diff --git a/.github/workflows/pypi-release.yml b/.github/workflows/pypi-release.yml index 0997a3c..c4291e0 100644 --- a/.github/workflows/pypi-release.yml +++ b/.github/workflows/pypi-release.yml @@ -14,13 +14,11 @@ jobs: uses: actions/setup-python@v4.3.0 with: python-version: 3.9 - - name: Checkout Repo id: checkout_repo uses: actions/checkout@v3 with: submodules: recursive - - name: Build Dist id: build_dist env: @@ -30,7 +28,6 @@ jobs: python3 -m pip install build --user python3 -m build ls -shl dist/ - - name: Publish to PyPI id: publish_pypi uses: pypa/gh-action-pypi-publish@v1.5.1 From 987c3bb2fa9fb96ffa86a620c0acbefbc48aa6b4 Mon Sep 17 00:00:00 2001 From: SomesH S Date: Sat, 3 Dec 2022 10:47:52 +0530 Subject: [PATCH 03/13] .github/workflows/*.yml - 'ubuntu-latest' -> 'ubuntu:22-04' --- .github/workflows/build-docker-image.yml | 6 +++--- .github/workflows/github-release.yml | 4 ++-- .github/workflows/pypi-release.yml | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build-docker-image.yml b/.github/workflows/build-docker-image.yml index 2c0d52d..0c18b06 100644 --- a/.github/workflows/build-docker-image.yml +++ b/.github/workflows/build-docker-image.yml @@ -4,7 +4,7 @@ on: [push, workflow_dispatch] jobs: build-api: - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - name: Login to Docker Hub uses: docker/login-action@v2.1.0 @@ -30,7 +30,7 @@ jobs: push: false build-sdk: - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - name: Login to Docker Hub uses: docker/login-action@v2.1.0 @@ -56,7 +56,7 @@ jobs: push: false build-app: - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 needs: [build-api, build-sdk] steps: - name: Login to GitHub Container Registry diff --git a/.github/workflows/github-release.yml b/.github/workflows/github-release.yml index 963113e..2ce58b7 100644 --- a/.github/workflows/github-release.yml +++ b/.github/workflows/github-release.yml @@ -7,7 +7,7 @@ on: jobs: create-release: - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - name: Create Release id: create_release @@ -21,7 +21,7 @@ jobs: prerelease: false deploy-package: - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 needs: [create-release] steps: - name: Checkout Repo diff --git a/.github/workflows/pypi-release.yml b/.github/workflows/pypi-release.yml index c4291e0..c54f731 100644 --- a/.github/workflows/pypi-release.yml +++ b/.github/workflows/pypi-release.yml @@ -7,7 +7,7 @@ on: jobs: create-release: - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - name: Setup Python 3.9 id: setup_python From f107b91f03dc63037280ce4b3189f53bf8285570 Mon Sep 17 00:00:00 2001 From: SomesH S Date: Sat, 3 Dec 2022 11:24:52 +0530 Subject: [PATCH 04/13] build-docker-image.yml - 'docker_build_push' -> 'docker_push_app' --- .github/workflows/build-docker-image.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-docker-image.yml b/.github/workflows/build-docker-image.yml index 0c18b06..092e973 100644 --- a/.github/workflows/build-docker-image.yml +++ b/.github/workflows/build-docker-image.yml @@ -74,8 +74,8 @@ jobs: - name: Setup Docker Buildx id: setup_buildx uses: docker/setup-buildx-action@v2.2.1 - - name: Build Push Docker Image - id: docker_build_push + - name: Build Push 'app' + id: docker_push_app uses: docker/build-push-action@v3.2.0 with: builder: ${{ steps.setup_buildx.name }} From 84c62d691f233d24310823b156c042b765e740ac Mon Sep 17 00:00:00 2001 From: SomesH S Date: Sat, 3 Dec 2022 11:49:20 +0530 Subject: [PATCH 05/13] Dockerfile - refactor with '--no-install-recommends' --- Dockerfile | 86 ++++++++++++++++++++++++++++++++++++++---------------- 1 file changed, 61 insertions(+), 25 deletions(-) diff --git a/Dockerfile b/Dockerfile index a5be2eb..c6e8b7a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,43 +1,77 @@ -FROM ubuntu:jammy as api +######################################################################################################################## +FROM ubuntu:jammy AS ubuntu +######################################################################################################################## +FROM ubuntu AS api ENV DEBIAN_FRONTEND='noninteractive' -RUN apt-get update && apt-get upgrade -y && \ - apt-get install -y git gperf make cmake clang-14 libc++-dev libc++abi-dev libssl-dev zlib1g-dev && \ +RUN apt-get update && \ + apt-get install --yes --no-install-recommends \ + git gperf make cmake clang-14 libc++-dev libc++abi-dev libssl-dev zlib1g-dev \ + && \ rm -rf /var/lib/apt/lists/* WORKDIR /root COPY api api -RUN cd api && rm -rf .git && mkdir build && cd build && \ - CXXFLAGS="-stdlib=libc++" CC=/usr/bin/clang-14 CXX=/usr/bin/clang++-14 \ - cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX:PATH=.. .. && \ - cmake --build . --target install -- -j $(nproc) && cd .. && \ +ARG CC="/usr/bin/clang-14" +ARG CXX="/usr/bin/clang++-14" +ARG CXXFLAGS="-stdlib=libc++" +RUN cd api && \ + rm -rf .git && \ + mkdir build && \ + cd build && \ + cmake \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_PREFIX:PATH=.. .. \ + && \ + cmake \ + --build . \ + --target install \ + -- -j $(nproc) \ + && \ + cd .. && \ ls -lh bin/telegram-bot-api* - -FROM ubuntu:jammy as sdk +######################################################################################################################## +FROM ubuntu AS sdk ENV DEBIAN_FRONTEND='noninteractive' -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 && \ +RUN apt-get update && \ + apt-get install --yes --no-install-recommends \ + autoconf automake gcc g++ git libtool make python3 python3-dev python3-distutils python3-pip \ + libc-ares-dev libcrypto++-dev libcurl4-openssl-dev libfreeimage-dev libsodium-dev \ + libsqlite3-dev libssl-dev swig zlib1g-dev \ + && \ rm -rf /var/lib/apt/lists/* WORKDIR /root COPY sdk sdk COPY ac-m4-py.patch . -RUN cd sdk && rm -rf .git && mv ../ac-m4-py.patch ./ && git apply ac-m4-py.patch && ./clean.sh && ./autogen.sh && \ - ./configure --disable-examples --disable-silent-rules --enable-python --with-sodium && \ - make -j $(nproc) && cd bindings/python/ && python3 setup.py bdist_wheel && \ +RUN cd sdk && \ + rm -rf .git && \ + mv ../ac-m4-py.patch ./ && \ + git apply ac-m4-py.patch && \ + ./clean.sh && \ + ./autogen.sh && \ + ./configure \ + --disable-examples \ + --disable-silent-rules \ + --enable-python \ + --with-sodium \ + && \ + make -j $(nproc) && \ + cd bindings/python/ && \ + python3 setup.py bdist_wheel && \ ls -lh dist/megasdk* - -FROM ubuntu:jammy as app +######################################################################################################################## +FROM ubuntu AS app COPY --from=api /root/api/bin/telegram-bot-api /usr/bin/telegram-bot-api COPY --from=sdk /root/sdk /root/sdk ENV DEBIAN_FRONTEND='noninteractive' ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' TZ='Asia/Kolkata' -RUN apt-get update && apt-get upgrade -y && \ - apt-get install -y aria2 curl ffmpeg jq locales nano pv python3 python3-pip python3-lxml tzdata && \ - apt-get install -y libc++-dev libmagic-dev libcrypto++-dev libfreeimage-dev software-properties-common && \ +RUN apt-get update && \ + apt-get install --yes --no-install-recommends \ + aria2 curl ffmpeg jq locales nano pv python3 python3-pip python3-lxml tzdata \ + libc++-dev libmagic-dev libcrypto++-dev libfreeimage-dev software-properties-common \ + && \ add-apt-repository ppa:qbittorrent-team/qbittorrent-stable && \ - apt-get install -y qbittorrent-nox && \ - apt-get purge -y software-properties-common && \ - apt-get autoremove -y && \ + apt-get install --yes --no-install-recommends \ + qbittorrent-nox \ + && \ rm -rf /var/lib/apt/lists/* RUN locale-gen en_US.UTF-8 RUN pip3 install --no-cache-dir /root/sdk/bindings/python/dist/megasdk-*.whl @@ -45,6 +79,8 @@ WORKDIR /usr/src/app RUN chmod 777 /usr/src/app COPY Pipfile . COPY grt.py . -RUN python3 grt.py && pip3 install --no-cache-dir -r requirements.txt +RUN python3 grt.py && \ + pip3 install --no-cache-dir -r requirements.txt COPY tgmb tgmb CMD ["python3", "-m", "tgmb"] +######################################################################################################################## From cfc0779ff1d5567f025b03767ba4d80795a542d9 Mon Sep 17 00:00:00 2001 From: SomesH S Date: Sat, 3 Dec 2022 11:56:18 +0530 Subject: [PATCH 06/13] build-docker-image.yml -> build-image.yml --- .github/workflows/{build-docker-image.yml => build-image.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{build-docker-image.yml => build-image.yml} (100%) diff --git a/.github/workflows/build-docker-image.yml b/.github/workflows/build-image.yml similarity index 100% rename from .github/workflows/build-docker-image.yml rename to .github/workflows/build-image.yml From a77a650097d1a38a166e188042b6bf31153f834e Mon Sep 17 00:00:00 2001 From: SomesH S Date: Sat, 3 Dec 2022 11:57:07 +0530 Subject: [PATCH 07/13] 'build-docker-image' -> 'build-image' --- .github/workflows/build-image.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-image.yml b/.github/workflows/build-image.yml index 092e973..5b4777d 100644 --- a/.github/workflows/build-image.yml +++ b/.github/workflows/build-image.yml @@ -1,4 +1,4 @@ -name: build-docker-image +name: build-image on: [push, workflow_dispatch] From 1aacd2f57c744b02bce8118feddadc26ee33e25b Mon Sep 17 00:00:00 2001 From: SomesH S Date: Sat, 3 Dec 2022 12:09:20 +0530 Subject: [PATCH 08/13] Dockerfile - mv 'rm -rf */.git' as separate last RUN step --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index c6e8b7a..446e163 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,7 +14,6 @@ ARG CC="/usr/bin/clang-14" ARG CXX="/usr/bin/clang++-14" ARG CXXFLAGS="-stdlib=libc++" RUN cd api && \ - rm -rf .git && \ mkdir build && \ cd build && \ cmake \ @@ -28,6 +27,7 @@ RUN cd api && \ && \ cd .. && \ ls -lh bin/telegram-bot-api* +RUN rm -rf api/.git ######################################################################################################################## FROM ubuntu AS sdk ENV DEBIAN_FRONTEND='noninteractive' @@ -42,7 +42,6 @@ WORKDIR /root COPY sdk sdk COPY ac-m4-py.patch . RUN cd sdk && \ - rm -rf .git && \ mv ../ac-m4-py.patch ./ && \ git apply ac-m4-py.patch && \ ./clean.sh && \ @@ -57,6 +56,7 @@ RUN cd sdk && \ cd bindings/python/ && \ python3 setup.py bdist_wheel && \ ls -lh dist/megasdk* +RUN rm -rf sdk/.git ######################################################################################################################## FROM ubuntu AS app COPY --from=api /root/api/bin/telegram-bot-api /usr/bin/telegram-bot-api From 0a38f9da162c089bc30aac91e251fb3281189453 Mon Sep 17 00:00:00 2001 From: SomesH S Date: Sat, 3 Dec 2022 14:11:25 +0530 Subject: [PATCH 09/13] Revert "Dockerfile - mv 'rm -rf */.git' as separate last RUN step" This reverts commit 1aacd2f57c744b02bce8118feddadc26ee33e25b. --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 446e163..c6e8b7a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,6 +14,7 @@ ARG CC="/usr/bin/clang-14" ARG CXX="/usr/bin/clang++-14" ARG CXXFLAGS="-stdlib=libc++" RUN cd api && \ + rm -rf .git && \ mkdir build && \ cd build && \ cmake \ @@ -27,7 +28,6 @@ RUN cd api && \ && \ cd .. && \ ls -lh bin/telegram-bot-api* -RUN rm -rf api/.git ######################################################################################################################## FROM ubuntu AS sdk ENV DEBIAN_FRONTEND='noninteractive' @@ -42,6 +42,7 @@ WORKDIR /root COPY sdk sdk COPY ac-m4-py.patch . RUN cd sdk && \ + rm -rf .git && \ mv ../ac-m4-py.patch ./ && \ git apply ac-m4-py.patch && \ ./clean.sh && \ @@ -56,7 +57,6 @@ RUN cd sdk && \ cd bindings/python/ && \ python3 setup.py bdist_wheel && \ ls -lh dist/megasdk* -RUN rm -rf sdk/.git ######################################################################################################################## FROM ubuntu AS app COPY --from=api /root/api/bin/telegram-bot-api /usr/bin/telegram-bot-api From c09b31487cc0f5627b7d02342475efb8669d7d45 Mon Sep 17 00:00:00 2001 From: SomesH S Date: Sat, 3 Dec 2022 14:18:56 +0530 Subject: [PATCH 10/13] Dockerfile - mv install software-properties common up --- Dockerfile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index c6e8b7a..c422165 100644 --- a/Dockerfile +++ b/Dockerfile @@ -64,13 +64,13 @@ COPY --from=sdk /root/sdk /root/sdk ENV DEBIAN_FRONTEND='noninteractive' ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' TZ='Asia/Kolkata' RUN apt-get update && \ - apt-get install --yes --no-install-recommends \ - aria2 curl ffmpeg jq locales nano pv python3 python3-pip python3-lxml tzdata \ - libc++-dev libmagic-dev libcrypto++-dev libfreeimage-dev software-properties-common \ + apt-get install --yes \ + software-properties-common \ && \ add-apt-repository ppa:qbittorrent-team/qbittorrent-stable && \ apt-get install --yes --no-install-recommends \ - qbittorrent-nox \ + aria2 curl ffmpeg jq locales nano pv python3 python3-pip python3-lxml qbittorrent-nox tzdata \ + libc++-dev libmagic-dev libcrypto++-dev libfreeimage-dev \ && \ rm -rf /var/lib/apt/lists/* RUN locale-gen en_US.UTF-8 From 249bb5120c7d2789c1dcbed18633768a0b98255e Mon Sep 17 00:00:00 2001 From: SomesH S Date: Sat, 3 Dec 2022 15:50:42 +0530 Subject: [PATCH 11/13] Dockerfile - install gnupg explicitly with --no-install-recommends --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index c422165..c31a06c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -64,8 +64,8 @@ COPY --from=sdk /root/sdk /root/sdk ENV DEBIAN_FRONTEND='noninteractive' ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' TZ='Asia/Kolkata' RUN apt-get update && \ - apt-get install --yes \ - software-properties-common \ + apt-get install --yes --no-install-recommends \ + gnupg software-properties-common \ && \ add-apt-repository ppa:qbittorrent-team/qbittorrent-stable && \ apt-get install --yes --no-install-recommends \ From 98946d54f08fc6666f9aaf2cbbb941f8c4bed6e9 Mon Sep 17 00:00:00 2001 From: SomesH S Date: Sat, 3 Dec 2022 15:59:20 +0530 Subject: [PATCH 12/13] Revert "Dockerfile - install gnupg explicitly with --no-install-recommends" This reverts commit 249bb5120c7d2789c1dcbed18633768a0b98255e. --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index c31a06c..c422165 100644 --- a/Dockerfile +++ b/Dockerfile @@ -64,8 +64,8 @@ COPY --from=sdk /root/sdk /root/sdk ENV DEBIAN_FRONTEND='noninteractive' ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' TZ='Asia/Kolkata' RUN apt-get update && \ - apt-get install --yes --no-install-recommends \ - gnupg software-properties-common \ + apt-get install --yes \ + software-properties-common \ && \ add-apt-repository ppa:qbittorrent-team/qbittorrent-stable && \ apt-get install --yes --no-install-recommends \ From a34ab29bf826bc9ab99902f028429769699d8a53 Mon Sep 17 00:00:00 2001 From: SomesH S Date: Sat, 3 Dec 2022 16:10:34 +0530 Subject: [PATCH 13/13] Dockerfile - stage 'sdk' - not move ac-m4-py.patch --- Dockerfile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index c422165..fc8a687 100644 --- a/Dockerfile +++ b/Dockerfile @@ -43,8 +43,7 @@ COPY sdk sdk COPY ac-m4-py.patch . RUN cd sdk && \ rm -rf .git && \ - mv ../ac-m4-py.patch ./ && \ - git apply ac-m4-py.patch && \ + git apply ../ac-m4-py.patch && \ ./clean.sh && \ ./autogen.sh && \ ./configure \