From 9f60efc04af9a7f2495684ebbf0fbc74c4bd39b6 Mon Sep 17 00:00:00 2001 From: lzzy12 Date: Fri, 24 Dec 2021 14:58:10 +0530 Subject: [PATCH] Make Dockerfile download mega binaries according to cpu architecture --- Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 1d6f7fe44..be6d47afd 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,7 @@ FROM ubuntu:20.04 WORKDIR /usr/src/app +SHELL ["/bin/bash", "-c"] RUN chmod 777 /usr/src/app RUN apt-get -qq update && \ DEBIAN_FRONTEND="noninteractive" apt-get -qq install -y tzdata aria2 git python3 python3-pip \ @@ -10,7 +11,7 @@ RUN apt-get -qq update && \ libcrypto++-dev libssl-dev \ libc-ares-dev libcurl4-openssl-dev \ libsqlite3-dev libsodium-dev && \ - curl -L https://github.com/jaskaranSM/megasdkrest/releases/download/v0.1/megasdkrest -o /usr/local/bin/megasdkrest && \ + curl -L https://github.com/lzzy12/megasdkrest/releases/download/v0.1.14-rebuild/megasdkrest-$(cpu=$(uname -m); if [[ "$cpu" == "x86_64" ]]; then echo "amd64"; elif [[ "$cpu" == "x86" ]]; then echo "i386"; elif [[ "$cpu" == "aarch64" ]]; then echo "arm64"; else echo $cpu; fi) -o /usr/local/bin/megasdkrest && \ chmod +x /usr/local/bin/megasdkrest COPY requirements.txt .