-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMegasdk
45 lines (36 loc) · 2 KB
/
Megasdk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
FROM python:3-slim-buster
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get -qq update \
&& apt-get -qq install -y --no-install-recommends \
git g++ gcc autoconf automake \
m4 libtool qt4-qmake make libqt4-dev libcurl4-openssl-dev \
libcrypto++-dev libsqlite3-dev libc-ares-dev \
libsodium-dev libnautilus-extension-dev \
libssl-dev libfreeimage-dev swig curl
RUN apt-get -qq install -y --no-install-recommends software-properties-common \
&& rm -rf /var/lib/apt/lists/* \
&& apt-add-repository non-free \
&& apt-get -qq update \
&& apt-get -qq install -y p7zip-full mediainfo p7zip-rar aria2 curl pv jq ffmpeg locales python3-lxml \
&& apt-get purge -y software-properties-common
RUN sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen && locale-gen
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8
ENV MEGA_SDK_VERSION '3.8.8'
RUN git clone https://github.com/meganz/sdk.git sdk && cd sdk \
&& git checkout v$MEGA_SDK_VERSION \
&& ./autogen.sh && ./configure --disable-silent-rules --enable-python --with-sodium --disable-examples \
&& make -j$(nproc --all) \
&& cd bindings/python/ && python3 setup.py bdist_wheel \
&& cd dist/ && pip3 install --no-cache-dir megasdk-$MEGA_SDK_VERSION-*.whl
RUN apt-get -y clean && apt-get -y autoremove \
&& rm -rf /var/lib/apt/lists \
&& rm -rf /var/cache/apt/archives
RUN curl -sLO https://raw.githubusercontent.com/breakdowns/slam-mirrorbot/master/requirements.txt \
&& curl -sLO https://raw.githubusercontent.com/breakdowns/slam-mirrorbot/master/requirements-cli.txt \
&& pip install -r requirements.txt && pip install -r requirements-cli.txt \
&& rm requirements.txt requirements-cli.txt
RUN curl -sLo /usr/local/bin/extract https://raw.githubusercontent.com/breakdowns/slam-mirrorbot/master/extract \
&& curl -sLo /usr/local/bin/pextract https://raw.githubusercontent.com/breakdowns/slam-mirrorbot/master/pextract \
&& chmod +x /usr/local/bin/extract /usr/local/bin/pextract