Dropbox backend with a simple web control GUI.
10K+
Dropbox can be a challenge to install on a linux system, in my case on a Centos server. This is especially true if you are in a country that uses multibyte characters in file names. At least I had some fun before I succeeded.
I started of with the great images that is provided by janeczku, which can be found here https://github.com/janeczku/docker-dropbox , but ran into problems with multibyte file names and I'am also to convenient to use the dropbox command line when I exclude and include folders from synchronization.
Dropbox requires you to have your local Dropbox storage on an ext4 file system, some distributions will by default use another Types. Eg. centos will by default create xfs file systems which will not work. So please fix the file system first. Your can find your current file system type using the following command:
df -T
The start script below will pull and start a container with named 'dropbox' with dropbox and a Nginx+php-fpm server running.
LAN-SYNC Is a great Dropbox feature that enables more dropbox instances on the same local network to syncronice over the LAN rather than transfer the files over internet. As Lan-Sync is exposed on a specific port (17500), only one instance on a computer can use it at a time.
More than one Dropbox on the same computer? Yes you can, you can have several instances running. But you need to name them unique using the --name tag in the start script. You also need to assign different port numbers -p 9001, -p 9002 etc for the control GUI.
Each instance also need to be connected to Dropbox accounts separately.
Startup script to start your container
#!/bin/bash
docker run -d \
-p 127.0.0.1:9001:80 \
-p 17500:17500 \
--name=dropbox \
--restart=unless-stopped \
-e DBOX_UID=`id -u $USER` \
-e DBOX_GID=`id -g $USER` \
-e LOCALE=sv_SE \
-v ~/.dropbox:/dbox/.dropbox:z \
-v ~/Dropbox:/dbox/Dropbox:z \
fmadsen/dropbox
View output from the container
docker logs dropbox -f
When you start the first time you must follow these steps:
The GUI is just a front-end that execute dropbox-cli commands. So infact it has nothing to do with the Dropbox software. , so please don't blame Dropbox if it doesn't work.
The gui is very simple and so is the code. Its even a little messy :-). My intention is that it will stay simple in this standard version, but keep it is open for expansion for your personal needs.


You can extract the php scripts for the Control GUI by the following command.
docker cp dropbox:/dbox/dcontrol dcontrol
After you have made your changes, you can run your own Control GUI by attaching your own code in the start command for the container, this will overwrite the standard GUI:
-v ~/dcontrol:/dbox/dcontrol:z
The following open source code are used
Content type
Image
Digest
Size
899.6 MB
Last updated
over 6 years ago
docker pull fmadsen/dropbox