mirror of
https://github.com/newnius/Dockerfiles.git
synced 2025-06-06 08:11:54 +00:00
add mega
This commit is contained in:
parent
03fcd3c56b
commit
b2ae876d5c
12
mega/Dockerfile
Normal file
12
mega/Dockerfile
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
FROM debian:9-slim
|
||||||
|
|
||||||
|
MAINTAINER Newnius <newnius.cn@gmail.com>
|
||||||
|
|
||||||
|
RUN apt-get update && apt-get install curl gnupg2 -y && \
|
||||||
|
curl https://mega.nz/linux/MEGAsync/Debian_9.0/amd64/megacmd-Debian_9.0_amd64.deb --output megacmd.deb && \
|
||||||
|
echo path-include /usr/share/doc/megacmd/* > /etc/dpkg/dpkg.cfg.d/docker && \
|
||||||
|
apt install ./megacmd.deb -y && \
|
||||||
|
rm megacmd.deb && \
|
||||||
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
CMD ["sleep", "infinity"]
|
37
mega/README.md
Normal file
37
mega/README.md
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
# Deploy MEGA.nz in docker
|
||||||
|
|
||||||
|
## Start
|
||||||
|
|
||||||
|
```bash
|
||||||
|
docker service create \
|
||||||
|
--name mega \
|
||||||
|
--hostname mega \
|
||||||
|
--replicas 1 \
|
||||||
|
--detach=true \
|
||||||
|
--mount type=bind,src=/etc/localtime,dst=/etc/localtime,readonly \
|
||||||
|
--mount type=bind,src=/data,dst=/data/,readonly \
|
||||||
|
--mount type=bind,src=/home/mega/.megaCmd/,dst=/root/.megaCmd/ \
|
||||||
|
newnius/mega
|
||||||
|
```
|
||||||
|
|
||||||
|
## Login
|
||||||
|
|
||||||
|
```bash
|
||||||
|
docker exec -it mega.1.xxxx mega-login [--auth-code CODE ] $MEGAEMAIL $MEGA_PASS
|
||||||
|
```
|
||||||
|
|
||||||
|
*It is suggested to enablt 2FA for security reasons.*
|
||||||
|
|
||||||
|
## Sync
|
||||||
|
|
||||||
|
```bash
|
||||||
|
docker exec -it mega.1.xxxx mega-sync /data /remote
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
## Reference
|
||||||
|
|
||||||
|
[Installation in Debian 9 fails at the post-install script](https://github.com/meganz/MEGAcmd/issues/6)
|
||||||
|
|
||||||
|
[MEGAcmd](https://mega.nz/cmd)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user