Skip to content

Commit 9f60efc

Browse files
Make Dockerfile download mega binaries according to cpu architecture
1 parent 4d0d75c commit 9f60efc

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
FROM ubuntu:20.04
22

33
WORKDIR /usr/src/app
4+
SHELL ["/bin/bash", "-c"]
45
RUN chmod 777 /usr/src/app
56
RUN apt-get -qq update && \
67
DEBIAN_FRONTEND="noninteractive" apt-get -qq install -y tzdata aria2 git python3 python3-pip \
@@ -10,7 +11,7 @@ RUN apt-get -qq update && \
1011
libcrypto++-dev libssl-dev \
1112
libc-ares-dev libcurl4-openssl-dev \
1213
libsqlite3-dev libsodium-dev && \
13-
curl -L https://github.com/jaskaranSM/megasdkrest/releases/download/v0.1/megasdkrest -o /usr/local/bin/megasdkrest && \
14+
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 && \
1415
chmod +x /usr/local/bin/megasdkrest
1516

1617
COPY requirements.txt .

0 commit comments

Comments
 (0)