Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Docker support #625

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
FROM ubuntu:20.04

ENV DEBIAN_FRONTEND noninteractive

WORKDIR /

RUN \
apt-get update &&\
apt-get install -y autoconf libtool g++ libcrypto++-dev libz-dev libsqlite3-dev libssl-dev \
libcurl4-gnutls-dev libreadline-dev libpcre++-dev libsodium-dev libc-ares-dev \
libfreeimage-dev libavcodec-dev libavutil-dev libavformat-dev libswscale-dev \
libmediainfo-dev libzen-dev libuv1-dev git make &&\
apt-get clean &&\
rm -rf /var/lib/apt/lists/*

COPY . /MEGAcmd/

RUN \
cd MEGAcmd &&\
git submodule update --init --recursive &&\
sh autogen.sh &&\
./configure --disable-dependency-tracking &&\
make &&\
make install &&\
ldconfig


7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,13 @@ source /Applications/MEGAcmd.app/Contents/MacOS/megacmd_completion.sh
## NAS systems
Currently we have build scripts for **Synology** and **QNAP**, which can be found in the `build/<system>` folder along with instructions on how to set up the build. Typically this results in a 'package' which can then be manually installed in the NAS. To use MEGAcmd on those systems, ssh into the device and run the commands as normal (having first added their folder to your `PATH` variable).

## Docker
There is an included `Dockerfile` that can be used to build and run MEGAcmd. It can be used with the following syntax:
```
docker build -t megacmd .
docker run --rm -ti -v ${HOME}/.megaCmd:/root/.megaCmd -v /path/to/download:/download megacmd mega-get "https://mega.nz/folder/<code>" /download/
```

*Important note for MacOS Catalina or above: since Catalina, MacOS uses `zsh` as default shell. If you want to have auto completion, we strongly recommend you to use `bash` shell (just execute `bash` in your terminal).

# Features:
Expand Down