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

docker-dropbox's People

Contributors

little-forest avatar renovate[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

docker-dropbox's Issues

libglapi.so.0: cannot open shared object file

Just started seeing this error, having recently updated some packages on the host. Not sure what has actually caused this.

ImportError: libglapi.so.0: cannot open shared object file: No such file or directory
!! dropbox: fatal python exception:
['Traceback (most recent call last):\n', '  File "dropbox/client/main.pyc", line 262, in <module>\n', '  File "dropbox/foundation/navigation_service/factory.pyc", line 19, in <module>\n', '  File "dropbox/foundation/navigation_service/navigation_service_impl.pyc", line 57, in <module>\n', '  File "dropbox/foundation/html_views/electron/manager_factory.pyc", line 13, in <module>\n', '  File "dropbox/foundation/html_views/local/common/manager.pyc", line 33, in <module>\n', '  File "dropbox/client/features/model_registry.pyc", line 13, in <module>\n', '  File "dropbox/client/features/generated_models.pyc", line 279, in <module>\n', '  File "dropbox/client/features/previews/view_anchor.pyc", line 104, in <module>\n', '  File "<_bootstrap_overrides>", line 153, in load_module\n', 'ImportError: libglapi.so.0: cannot open shared object file: No such file or directory\n'] (error 3)

This recent thread on dropboxforum issue lists some additional libs required when installing on Ubuntu 18.04

sudo apt-get install libc6
sudo apt-get install libglapi-mesa
sudo apt-get install libxdamage1
sudo apt-get install libxfixes3
sudo apt-get install libxcb-glx0
sudo apt-get install libxcb-dri2-0
sudo apt-get install libxcb-dri3-0
sudo apt-get install libxcb-present0
sudo apt-get install libxcb-sync1
sudo apt-get install libxshmfence1
sudo apt-get install libxxf86vm1

not sure which of these we will need for alpine.

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

dockerfile
Dockerfile
  • ubuntu 18.04
github-actions
.github/workflows/docker-build.yaml
  • actions/checkout v4
  • dorny/paths-filter v3
  • docker/setup-qemu-action v3
  • docker/setup-buildx-action v3
  • docker/login-action v3
  • docker/build-push-action v5

  • Check this box to trigger a request for Renovate to run again on this repository

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.