Git Product home page Git Product logo

docker-dropbox's Introduction

Dropbox client in Docker with systemd unit

Dropbox client docker image that has the following futures.

  • Supports any UID/GID.
  • Can use cli client(dropbox.py) from host.
  • Provides systemd unit file, so you can operate dropbox easily on CentOS7.

Quick start

$ mkdir ~/Dropbox ~/.dropbox
# docker run --rm --name=dropbox \
    -e USER_ID=1000 \
    -e GROUP_ID=1000 \
    -v ~/Dropbox:/home/dbox/Dropbox \
    -v ~/.dropbox:/home/dbox/.dropbox \
    -v /etc/localtime:/etc/localtime:ro \
    littlef/dropbox:1.1.4

Environment variables

  • USER_ID : ~/Dropbox directory's owner uid.
  • GROUP_ID : ~/Dropbox directory's owner gid.

Directories

  • ~/Dropbox : Dropbox synchronized directory.
  • ~/.dropbox : Stores meta files which use dropbox client.

Quick start a dropbox client as systemd service (recomended)

Assume that the username is bob.

$ sudo cp [email protected] /etc/systemd/system/
$ sudo systemctl daemon-reload && echo OK
OK
$ sudo systemctl enable [email protected]
$ sudo systemctl start [email protected]

Unit's instance name should be unix user name.

Systemd controled dropbox docker container name is dropbox_<instance_name> such as dropbox_bob

First link to your Dropbox account

On the first start, you have to link your Dropbox account.

After starting dropbox service, please check journal logs.

$ sudo journalctl -fau dropbox@<instance_name>

You will see following messages.

This computer isn't linked to any Dropbox account...
Please visit https://www.dropbox.com/cli_link_nonce?nonce=XXXXXXXXXXXXXXXXXXXXXXXXXXX to link this device.

Visit the URL and link to your account. When your computer linked successfully, you will see following message.

This computer is now linked to Dropbox. Welcome XXXXXX

How to show dropbox client status

You can use dropbox cli command (dropbox.py) as follows.

$ docker exec -it <container name> /dropbox <command>

For example you can show dropbox client status as follows.

$ docker exec -it <container name> /dropbox status

For more details, please use help command.

$ docker exec -it <container name> /dropbox help

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.