Giter Club home page Giter Club logo

docker-dropbox's Introduction

๐Ÿณ Dropbox Docker Image

Docker Pulls Docker Stars GitHub issues Travis MicroBadger Layers GitHub stars MIT License

Run Dropbox inside a Docker container. Fully working with local host folder mount or inter-container linking (via --volumes-from). This repository provides the otherguy/dropbox image.

Usage ๐Ÿš€

Quickstart

This starts the Dropbox container with default settings:

$ docker run --detach --restart=always --name=dropbox otherguy/dropbox

Persistent Dropbox Folder

It is recommended that you run dropbox with a custom user/group id when mounting the Dropbox file folder to the local filesystem. This fixes file permission errrors that might occur when mounting from the host or another Docker container volume.

You need to set the DROPBOX_UID and DROPBOX_GID environment variables to the user id and group id of w hoever owns these files on the host or in the other container. The example below uses id -u and id -g to retrieve the current user's user id and group id, respectively.

$ docker run --detach --name=dropbox --restart=always \
  -e DROPBOX_UID=$(id -u) -e DROPBOX_GID=$(id -g) \
  -v "/path/to/local/settings:/opt/dropbox/.dropbox" \
  -v "/path/to/local/dropbox:/opt/dropbox/Dropbox" \
  otherguy/dropbox:latest

Enable LAN Sync

Using --net="host" allows Dropbox to utilize local LAN sync.

$ docker run --detach --name=dropbox --restart=always \
  --net="host" \
  otherguy/dropbox

Linking Dropbox Account

To link Dropbox to your account, check the logs of the Docker container to retrieve the Dropbox authentication URL:

$ docker logs --follow dropbox

Dropbox Account Linking

Copy and paste the URL in a browser and login to your Dropbox account to associate the Docker container. You should see something like this:

This computer is now linked to Dropbox. Welcome [your name]"

Manage Dropbox Settings

To manage dropbox exclusions or get a sharing link, you need to execute the dropbox command inside the Docker dropbox container:

$ docker exec -it dropbox gosu dropbox dropbox [dropbox command]

For example, to get an overview of the commands possible, use help:

$ docker exec -it dropbox gosu dropbox dropbox help

Configuration

Environment Variables

  • DROPBOX_UID If set, runs Dropbox with a custom user id. This must matching the user id of the owner of the mounted files. Defaults to 1000.

  • DROPBOX_GID If set, runs Dropbox with a custom user id. This must matching the group id of the owner of the mounted files. Defaults to 1000.

  • DROPBOX_SKIP_UPDATE If set to true, skips updating the Dropbox app on container startup. Note: This is not very reliable because the dropbox daemon will try to update itself even if this is set to true.

Exposed Volumes

  • /opt/dropbox/Dropbox The actual Dropbox folder, containing all your synced files.

  • /opt/dropbox/.dropbox Account and other settings for Dropbox. If you don't mount this folder, your account needs to be linked every time you restart the container.

Note ๐Ÿ“

It appears that as of December 2019, Dropbox (version 87.4.138) is now finally enforcing its file system requirements. Because this causes problems with Docker volume mounts, this container now includes the dropbox-filesystem-fix patch.

Inspiration ๐Ÿ’…

Originally forked from janeczku/dropbox. Thank you @janeczku for your work!

Contributing ๐Ÿšง

Bug reports and pull requests are welcome on GitHub at otherguy/docker-dropbox.

docker-dropbox's People

Contributors

otherguy avatar jefft avatar janeczku avatar tytso avatar

Watchers

James Cloos avatar

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.