GithubHelp home page GithubHelp logo

docker-dropbox's Introduction

Dropbox in Docker

Docker Pulls License

Run Dropbox inside Docker. Fully working with local host folder mount or inter-container linking (via --volumes-from).

This repository provides the janeczku/dropbox image.

Usage examples

Quickstart

docker run -d --restart=always --name=dropbox janeczku/dropbox

Dropbox data mounted to local folder on the host

docker run -d --restart=always --name=dropbox \
-v /path/to/localfolder:/dbox/Dropbox \
janeczku/dropbox

Run dropbox with custom user/group id

This fixes file permission errrors that might occur when mounting the Dropbox file folder (/dbox/Dropbox) from the host or a Docker container volume. You need to set DBOX_UID/DBOX_GID to the user id and group id of whoever owns these files on the host or in the other container.

docker run -d --restart=always --name=dropbox \
-e DBOX_UID=110 \
-e DBOX_GID=200 \
janeczku/dropbox

Enable LAN Sync

docker run -d --restart=always --name=dropbox \
--net="host" \
janeczku/dropbox

Linking to Dropbox account after first start

Check the logs of the container to get URL to authenticate with your Dropbox account.

docker logs dropbox

Copy and paste the URL in a browser and login to your Dropbox account to associate.

docker logs dropbox

You should see something like this:

"This computer is now linked to Dropbox. Welcome xxxx"

Manage exclusions and check sync status

docker exec -t -i dropbox dropbox help

ENV variables

DBOX_UID
Default: 1000
Run Dropbox with a custom user id (matching the owner of the mounted files)

DBOX_GID
Default: 1000
Run Dropbox with a custom group id (matching the group of the mounted files)

$DBOX_SKIP_UPDATE
Default: False
Set this to True to skip updating to the latest Dropbox version on container start

Exposed volumes

/dbox/Dropbox Dropbox files

/dbox/.dropbox Dropbox account configuration

docker-dropbox's People

Contributors

janeczku avatar jefft avatar tytso avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

docker-dropbox's Issues

Manage exclusions always returns "No directories are being ignored."

I cannot successfully exclude and directories. I know that the exclude function can be picky but it seems to be impossible within the docker container.

I have attempted the following.
sudo docker exec -i -t dropbox dropbox exclude add Exclude
sudo docker exec -i -t dropbox dropbox exclude add /dbox/Dropbox/Exclude

I also tried interacting with the container, changing to the /dbox/Dropbox directory and executing the exclude command there but no luck.

Is this possible?

Thanks,

H

I'm getting "Dropbox isn't running!"

Hey,

First of all thanks a lot for creating this image!

I'm having some problems though, while looking at docker logs dropbox I get the link URL and get This computer is now linked to Dropbox. Welcome Dain, but it doesn't seem to actually sync.

Also when I do a docker exec -t -i dropbox dropbox status or type dropbox inside the container I get Dropbox isn't running!.

I'm trying to map a volume into the Dropbox folder, have you tried that? Also to save the sensitive info locally to prevent having to log in every time. So something along the lines of:

docker volume create --name dropbox_volume
docker run -d --name=dropbox \
                  -e DBOX_UID=0 \
                  -e DBOX_GID=0 \
                  --volume dropbox_volume:/dbox/Dropbox/data \
                  --volume /Users/.../sensitive/dropbox:/dbox/.dropbox \
                  --restart=always \
                  janeczku/dropbox

Is there anything wrong with this?

Issue on OMV

Hi guys, newbie here. I'm running docker on OpenMediaVault. I can't get up and running with this dropbox image. I'm getting the following error when checking the docker logs:

ImportError: libdropbox_apex.so: cannot open shared object file: No such file or directory

would anyone have any ideas what I'm doing wrong?

Thanks
Luke

Saving credentials, part II

Thanks very much for this useful image. One problem I have is I want to deploy it into my private repository already logged in. To do this I tried removing the volume you have created at /dbox/.dropbox. This way I can commit that directory's contents back to the image after running it and logging it in.

Doing so, I can clearly see the /dbox/.dropbox contents in my docker diff output, before docker container commiting them. But after I stop the container and start my newly committed image, it requires logging in with the URL again.

The files are there, but the running Dropbox service seems to reject them. What am I missing?

-Brandon

dropboxd: not found

After a system restart, dropbox was no longer working.

Restarting the container (docker restart dropbox) gives

$ dropbox status
Starting ...

And then after a while

$ dropbox status
Dropbox is not running

I tried removing the container and running dropbox-start all over. Log:

$ docker logs dropbox
Checking for latest Dropbox version...
Latest   : 78.4.119
Installed: 11.4.21
Downloading Dropbox v78.4.119...
#######                                                                   10.1%
curl: (56) SSL read: error:00000000:lib(0):func(0):reason(0), errno 104

gzip: stdin: unexpected end of file
tar: Unexpected EOF in archive
tar: Unexpected EOF in archive
tar: Error is not recoverable: exiting now
Installing new version...
Dropbox updated to v78.4.119
Starting dropboxd (78.4.119)...
/opt/dropbox/dropboxd: 3: exec: /opt/dropbox/dropbox-lnx.x86_64-78.4.119/dropboxd: not found
Checking for latest Dropbox version...
Latest   : 78.4.119
Installed: 78.4.119
Dropbox is up-to-date
Starting dropboxd (78.4.119)...
/opt/dropbox/dropboxd: 3: exec: /opt/dropbox/dropbox-lnx.x86_64-78.4.119/dropboxd: not found

Now

dropbox status
Error response from daemon: Container 714f1e69dc62b947448d8ab7f91c5392f8986d1e9ede094d967178011115e4d6 is restarting, wait until the container is running

Unsupported filesystem when running on OSX host

I'm trying to run a dropbox instance in docker on OSX. I'm able to get things started up and connected to dropbox. However, once syncing starts I get the following error:

[ALERT]: So your files continue to sync, sign in to your Dropbox account and move Dropbox to a supported file system.

The filesystem associated with /dbox/Dropbox is listed as osxfs:

osxfs 1.9T 91G 1.8T 5% /dbox/Dropbox

I'm guessing this version of dropbox doesn't know what to do with this type of filesystem.

Any ideas?

Add conditional check for current user:group id on run file.

Hi @janeczku,
Thank you for creating this docker image.
One thing I found with a larger dropbox installation, is that when you go through the run file where you do the chown https://github.com/janeczku/docker-dropbox/blob/master/run#L28, it can take a long time to re-do this process, especially depending on the amount of files in your dropbox.
A solution would be to create a conditional statement to see if they are already set, before doing this process. ie $(stat -c "%u" /dbox) Also noticed that this pull request might do the same thing ea15ed1

Same credentials for multiple instances

Similar to other questions/issues, namely #22, is it possible to use the same credentials/link for multiple containers? I've tried mapping and sharing .dropbox using --volume, but it does not appear to work correctly. Sometimes the containers don't start correctly and sometimes they don't sync at all or only partially. If I link each container independently by leaving the .dropbox folder unmapped and, instead, only map the data, everything works fine.

On a related note, has anyone had trouble with multiple instances not starting correctly without delays or manual restarts? My main issue is file counts, which is why I am running multiple instances. My office file server has 4 million files and the Dropbox client turns into mush after syncing approximately 350k files. To get around that, I am running 10 docker instances all linked to the same account with different excluded folders, which works fine once everything is up and running. Unfortunately, they don't always start properly and I had to link each instance individually instead of relying on one set of credentials. Maybe I didn't do it correctly, but I haven't seen any information that says sharing credentials should work the way I'm describing.

Permission denied

docker logs dropbox shows:

Couldn't start Dropbox.
This is usually because of a permissions error. Storing your home folder on a network share can also cause an error.
Get more help at https://www.dropbox.com/c/help/permissions_error
Please contact Dropbox support with the following info for help:
/var/tmp/dropbox_errorqg7annf1.txt

I presume that I'm supposed to run with -v ~homedir/Dropbox/:/dbox/Dropbox to do the mount. I've tried the run command with various combinations of the uid/gid environment variables, all with the same negative result.

Do I have to re-link the Dropbox account every time I run the container? If so, then I have to manually intervene every time my host is re-started (and thus the container is re-started). Am I missing something?

Since Dropbox dropped support for my O/S, it would be very helpful to actually use Dropbox this way. Thanks!

Not working at all

I used to have to restart the dropbox container in order for it to work, but now it's not working at all. Any ideas?

I start dropbox like this:

docker run -d --restart=always --name=dropbox -v backup:/dbox/Dropbox janeczku/dropbox
docker logs dropbox

Connect the dropbox account by pasting the URL. Run:
docker logs dropbox

It says it's connected but the backup volume contents are not transferred.

Is it possible to keep dropbox device link static for each executed container ?

Hi,

Sorry if this is very inocent/basic question.

Everytime i run a dropbox container with this or similar images, this arises on terminal:

Please visit https://www.dropbox.com/cli_link_nonce?nonce=xxxxxxxxxxxxxxx to link this device.

This is normal, as expected, like when you run dropbox client on host. Same for docker compose deployments, because the container finally started is identified by dropbox engine like another new one, like a new device to be linked.

But, for "particular use" this is cumbersome (if it is not assumed to have always available/running containers) because you'll need to link the new device (container) in dropbox site (and probably you will have to unlink older ones). I mean, for use on-demand (i open my laptop and want to use this docker image to manage my dropbox accounts ...) it is a handicap ...

Is it any way to avoid renewing this, upon reboots ?. It depends on how dropbox calculates the link url to register/link the device (i didn't found the algorithm to try to understand/trick it). Perhaps this depends on the host id, mac, whatever and could be possible to "replace" or "supplant".

On summary, could it be possible to pin up this "link value" to identify new containers as the same device, furthermore, be taken into account for this docker image ?

Note: i tested with fixed hostname (by mean adding to docker run the option '-h hostname'), but same results. On Dropbox site it will appear as same device name, but actually a different link is needed to be reactivated ... :-(

thank u very much
BRs !

inotify.max_user_watches on synology

I am trying to work out how to issue this command under DSM6.1 on my synology rack station... neither file [inotify or tee] seem to exist... is there any other solution?

Many thanks

Dropbox redownload full content every container restart

My setup:
Proxmox -> Debian VM -> Docker Dropbox

Dropbox folder located on mergerfs volume, contains 29gb in 135k files and owned by uid=1000 gid=100.
Everytime i restart container, dropbox do chown, upgade version, reindex and redownload whole folder. Why he do this everytime? This affects VM performance for hours.

docker run -d
--restart=always
--name=dropbox
--net=host
-e DBOX_UID=1000 -e DBOX_GID=100
-v /media/storage/dropbox:/dbox/Dropbox
-v /docker/containers/dropbox/config:/dbox/.dropbox
janeczku/dropbox

dropbox out of date

I'm running the dropbox docker image and i'm getting the following output:

root@dropbox:/# dropbox status
You're using an old version of Dropbox. Please update within the next 12 days to continue using Dropbox.

https://www.dropbox.com/downloading?from_client=True
Up to date

I've tried also to apt-get update ; apt-get install dropbox, and no changes have been made.

root@dropbox:/# apt-get install dropbox
Reading package lists... Done
Building dependency tree
Reading state information... Done
dropbox is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 40 not upgraded.
root@dropbox:/# apt-cache showpkg dropbox
Package: dropbox
Versions:
2015.10.28 (/var/lib/apt/lists/linux.dropbox.com_debian_dists_jessie_main_binary-amd64_Packages.gz) (/var/lib/apt/lists/linux.dropbox.com_debian_dists_jessie_main_binary-i386_Packages.gz) (/var/lib/dpkg/status)
 Description Language:
                 File: /var/lib/apt/lists/linux.dropbox.com_debian_dists_jessie_main_binary-amd64_Packages.gz
                  MD5: f939f05a439263eadbe01f62e4eb496e


Reverse Depends:
  nautilus-dropbox,dropbox
Dependencies:
2015.10.28 - procps (0 (null)) python-gtk2 (2 2.12) python (2 2.5) libatk1.0-0 (2 1.20.0) libc6 (2 2.4) libcairo2 (2 1.6.0) libglib2.0-0 (2 2.16.0) libgtk2.0-0 (2 2.12.0) libpango1.0-0 (2 1.20.1) lsb-release (0 (null)) nautilus (2 2.16.0) python-gpgme (2 0.1) nautilus-dropbox (0 (null)) nautilus-dropbox (0 (null))
Provides:
2015.10.28 - nautilus-dropbox
Reverse Provides:

any ideas?

Not syncing after the first login

I have the following problem: when I run for the first time the image and I authenticate myself the daemon remains in "Starting..." mode, the .dropbox file is created but nothing is synchronized. If I kill the daemon and start it again the synchronization works as expected.

The output is the following:

DBOX_UID variable not specified, defaulting to dropbox user id (1000)
DBOX_GID variable not specified, defaulting to dropbox user group id (1000)
Checking for latest Dropbox version...
Latest   : 54.4.90
Installed: 11.4.21
Downloading Dropbox v54.4.90...
######################################################################## 100.0%
Installing new version...
Dropbox updated to v54.4.90
Starting dropboxd (54.4.90)...
dropbox: locating interpreter
!! dropbox: failed to create log file (Permission denied)!
dropbox: initializing
dropbox: initializing python 3.5.4
dropbox: setting program path '/opt/dropbox/dropbox-lnx.x86_64-54.4.90/dropbox'
dropbox: setting home path '/opt/dropbox/dropbox-lnx.x86_64-54.4.90'
dropbox: setting python path '/opt/dropbox/dropbox-lnx.x86_64-54.4.90:/opt/dropbox/dropbox-lnx.x86_64-54.4.90/python-packages-35.zip'
dropbox: python initialized
dropbox: running dropbox
dropbox: setting args
dropbox: applying overrides
dropbox: running main script
dropbox: load fq extension '/opt/dropbox/dropbox-lnx.x86_64-54.4.90/cryptography.hazmat.bindings._constant_time.cpython-35m-x86_64-linux-gnu.so'
dropbox: load fq extension '/opt/dropbox/dropbox-lnx.x86_64-54.4.90/cryptography.hazmat.bindings._openssl.cpython-35m-x86_64-linux-gnu.so'
dropbox: load fq extension '/opt/dropbox/dropbox-lnx.x86_64-54.4.90/cryptography.hazmat.bindings._padding.cpython-35m-x86_64-linux-gnu.so'
dropbox: load fq extension '/opt/dropbox/dropbox-lnx.x86_64-54.4.90/psutil._psutil_linux.cpython-35m-x86_64-linux-gnu.so'
dropbox: load fq extension '/opt/dropbox/dropbox-lnx.x86_64-54.4.90/psutil._psutil_posix.cpython-35m-x86_64-linux-gnu.so'
dropbox: load fq extension '/opt/dropbox/dropbox-lnx.x86_64-54.4.90/linuxffi.pthread._linuxffi_pthread.cpython-35m-x86_64-linux-gnu.so'
dropbox: load fq extension '/opt/dropbox/dropbox-lnx.x86_64-54.4.90/linuxffi.fcntl._linuxffi_fcntl.cpython-35m-x86_64-linux-gnu.so'
dropbox: load fq extension '/opt/dropbox/dropbox-lnx.x86_64-54.4.90/linuxffi.sys.compiled._linuxffi_sys.cpython-35m-x86_64-linux-gnu.so'
dropbox: load fq extension '/opt/dropbox/dropbox-lnx.x86_64-54.4.90/tornado.speedups.cpython-35m-x86_64-linux-gnu.so'
dropbox: load fq extension '/opt/dropbox/dropbox-lnx.x86_64-54.4.90/cpuid.compiled._cpuid.cpython-35m-x86_64-linux-gnu.so'
dropbox: load fq extension '/opt/dropbox/dropbox-lnx.x86_64-54.4.90/linuxffi.resolv.compiled._linuxffi_resolv.cpython-35m-x86_64-linux-gnu.so'
dropbox: load fq extension '/opt/dropbox/dropbox-lnx.x86_64-54.4.90/posixffi.libc._posixffi_libc.cpython-35m-x86_64-linux-gnu.so'
dropbox: load fq extension '/opt/dropbox/dropbox-lnx.x86_64-54.4.90/librsyncffi.compiled._librsyncffi.cpython-35m-x86_64-linux-gnu.so'
dropbox: locating interpreter
!! dropbox: failed to create log file (Permission denied)!
dropbox: initializing
dropbox: initializing python 3.5.4
dropbox: setting program path '/opt/dropbox/dropbox-lnx.x86_64-54.4.90/dropbox'
dropbox: setting home path '/opt/dropbox/dropbox-lnx.x86_64-54.4.90'
dropbox: setting python path '/opt/dropbox/dropbox-lnx.x86_64-54.4.90:/opt/dropbox/dropbox-lnx.x86_64-54.4.90/python-packages-35.zip'
dropbox: python initialized
dropbox: running dropbox
dropbox: setting args
dropbox: applying overrides
dropbox: running main script
dropbox: load fq extension '/opt/dropbox/dropbox-lnx.x86_64-54.4.90/cryptography.hazmat.bindings._constant_time.cpython-35m-x86_64-linux-gnu.so'
dropbox: load fq extension '/opt/dropbox/dropbox-lnx.x86_64-54.4.90/cryptography.hazmat.bindings._openssl.cpython-35m-x86_64-linux-gnu.so'
dropbox: load fq extension '/opt/dropbox/dropbox-lnx.x86_64-54.4.90/cryptography.hazmat.bindings._padding.cpython-35m-x86_64-linux-gnu.so'
dropbox: load fq extension '/opt/dropbox/dropbox-lnx.x86_64-54.4.90/psutil._psutil_linux.cpython-35m-x86_64-linux-gnu.so'
dropbox: load fq extension '/opt/dropbox/dropbox-lnx.x86_64-54.4.90/psutil._psutil_posix.cpython-35m-x86_64-linux-gnu.so'
dropbox: load fq extension '/opt/dropbox/dropbox-lnx.x86_64-54.4.90/linuxffi.pthread._linuxffi_pthread.cpython-35m-x86_64-linux-gnu.so'
dropbox: load fq extension '/opt/dropbox/dropbox-lnx.x86_64-54.4.90/linuxffi.fcntl._linuxffi_fcntl.cpython-35m-x86_64-linux-gnu.so'
dropbox: load fq extension '/opt/dropbox/dropbox-lnx.x86_64-54.4.90/linuxffi.sys.compiled._linuxffi_sys.cpython-35m-x86_64-linux-gnu.so'
dropbox: load fq extension '/opt/dropbox/dropbox-lnx.x86_64-54.4.90/tornado.speedups.cpython-35m-x86_64-linux-gnu.so'
dropbox: load fq extension '/opt/dropbox/dropbox-lnx.x86_64-54.4.90/cpuid.compiled._cpuid.cpython-35m-x86_64-linux-gnu.so'
dropbox: load fq extension '/opt/dropbox/dropbox-lnx.x86_64-54.4.90/linuxffi.resolv.compiled._linuxffi_resolv.cpython-35m-x86_64-linux-gnu.so'
dropbox: load fq extension '/opt/dropbox/dropbox-lnx.x86_64-54.4.90/posixffi.libc._posixffi_libc.cpython-35m-x86_64-linux-gnu.so'
dropbox: load fq extension '/opt/dropbox/dropbox-lnx.x86_64-54.4.90/librsyncffi.compiled._librsyncffi.cpython-35m-x86_64-linux-gnu.so'
This computer isn't linked to any Dropbox account...
Please visit https://www.dropbox.com/cli_link_nonce?nonce=ENCRYPTED to link this device.
This computer isn't linked to any Dropbox account...
Please visit https://www.dropbox.com/cli_link_nonce?nonce=ENCRYPTED to link this device.
This computer isn't linked to any Dropbox account...
Please visit https://www.dropbox.com/cli_link_nonce?nonce=ENCRYPTED to link this device.

CLI crashing on Unicode characters

Well I guess this one's on Dropbox side and not this image, but you may shed some light:
The CLI often crashes with an error such as this:

root@nfs-server-5f96bd9d5c-xn7n8:/dbox/Dropbox# dropbox status
Traceback (most recent call last):
  File "/usr/bin/dropbox-cli", line 1535, in <module>
    ret = main(sys.argv)
  File "/usr/bin/dropbox-cli", line 1524, in main
    result = commands[argv[i]](argv[i+1:])
  File "/usr/bin/dropbox-cli", line 719, in newmeth
    return meth(*n, **kw)
  File "/usr/bin/dropbox-cli", line 1187, in status
    console_print(line)
  File "/usr/bin/dropbox-cli", line 127, in console_print
    f.write(st.encode(enc))
UnicodeEncodeError: 'ascii' codec can't encode character u'\u2022' in position 20: ordinal not in range(128)

It doesn't seem to be bothering the daemon process and other than not being able to run some commands, the sync is working fine, but it makes working with it a but more difficult.
Obviously I suspect this happens when encountering files with non-ASCII filenames.

Not syncing

Hi,

Thanks for creating this image. I'm testing it ATM. When I first moved files into the volume that corresponds to /dbox/Dropbox`, they are moved to the corresponding dropbox account, however subsequent file additions do not show up, even though the dropbox container is still running.

If I restart the dropbox container, then the files show up.

Thoughts?

TIA,
Ole

Continuous file Updates when running two containers to the same folder

Hallo, i have the following problem.
First: System Ubuntu 18.04, Docker version 19.03.2, build 6a30dfc
I have two dropboxes wich i want to sync. So i run two containers:

docker run -d --restart=always --name=dropbox1 -v /home/user/dropbox:/dbox/Dropbox janeczku/dropbox

docker run -d --restart=always --name=dropbox2 -v /home/user/dropbox:/dbox/Dropbox janeczku/dropbox

I link the two containers to two different accounts. Then i stop both containers and start the first one. When only one container runs everything works just fine. I see my dropbox files in /home/user/dropbox/ - wich is currently only test1.txt - and i see the same file on my Windows PC. Then is start the second container. When the container is up and running the File gets deleted and resyncd on my Windows PC. In the /home/user/dropbox/ folder the file stays but it constantly gets a new "changed" timestamp. When i look at the timestamps it looks the following:

stat test1.txt
File: test1.txt
Size: 6 Blocks: 8 IO Block: 4096 regular file
Device: 802h/2050d Inode: 18087944 Links: 1
Access: (0644/-rw-r--r--) Uid: ( 1000/ user) Gid: ( 1000/ user)
Access: 2019-09-12 12:58:48.075353393 +0200
Modify: 2019-09-12 10:22:06.000000000 +0200
Change: 2019-09-12 13:10:21.815200862 +0200

4 Seconds later:

stat test1.txt
File: test1.txt
Size: 6 Blocks: 8 IO Block: 4096 regular file
Device: 802h/2050d Inode: 18087944 Links: 1
Access: (0644/-rw-r--r--) Uid: ( 1000/ user) Gid: ( 1000/ user)
Access: 2019-09-12 12:58:48.075353393 +0200
Modify: 2019-09-12 10:22:06.000000000 +0200
Change: 2019-09-12 13:10:25.311231190 +0200

The Change timestamp is updated:
Change: 2019-09-12 13:10:25.311231190 +0200
Change: 2019-09-12 13:10:28.915262385 +0200

And so on. The Problem is that my Windows PC deletes the file and redownloads the "new" but unchanged file. For more Files and bigger folders this is an even bigger problem and messes up the data.
Has anyone a solution?

How to save credential ?

Hi janeczku

Thanks for the good container.

I'm wondering if there's some way to save the credential? Something like mounting the id file or database to avoid re-enabling the share through logs link whenever I regenerate my setup (which happen 100 times a day whenever I test some new stuff !)

Best regards,

Disk usage in long running dropbox container

I figured out that dropbox has a tendency to self-update/download a new version of itself. It stores these things under /tmp, in folders like these:

root@dropbox:/tmp# du -sh .dropbox-dist-new-*
142M    .dropbox-dist-new-XNUozR
142M    .dropbox-dist-new-oIuDgE
142M    .dropbox-dist-new-rV_W6h

And also some under /dbox

root@dropbox:/dbox# du -sh .dropbox*
254M    .dropbox
166M    .dropbox-dist
61M     .dropbox-dist-tmp-31iEgN
128M    .dropbox-dist-tmp-S2eZ8J
133M    .dropbox-dist-tmp-cZJU7K

It seems also that all of the files in tmp are the same (no diff);

root@dropbox:/tmp# diff -qr .dropbox-dist-new-XNUozR/ .dropbox-dist-new-rV_W6h/
root@dropbox:/tmp# diff -qr .dropbox-dist-new-XNUozR/ .dropbox-dist-new-oIuDgE/
root@dropbox:/tmp#

I'm mounting the configs and the file volume with -v. When removing the container, and restarting the container I can reproduce the behaviour just with time:

root@serenity:/src/dropbox/bin# ./run status
Syncing (2,695 files remaining)
Indexing 2,695 files...
root@serenity:/src/dropbox/bin# ./run status
Upgrading Dropbox...
root@serenity:/src/dropbox/bin# ./run status
Syncing (5,292 files remaining)
Indexing 5,292 files...
root@serenity:/src/dropbox/bin# ./run status
Up to date

Docker logs:

root@serenity:/src/dropbox/bin# docker logs dropbox
DBOX_UID (user id) variable not specified, defaulting to 1000..
DBOX_GID (group id) variable not specified, defaulting to 1000..
dropboxd(3.14.7) started...
DBOX_UID (user id) variable not specified, defaulting to 1000..
DBOX_GID (group id) variable not specified, defaulting to 1000..
dropboxd(3.14.7) started...

ID 1000 is local user 'black', permissions for config folder are all set to black.black (and files were written by the container after starting up a clean instance).

root@serenity:/src/dropbox/conf# find -type f | xargs ls -lad | grep -v black
root@serenity:/src/dropbox/conf#

The whole run script I'm attaching just for posterity:

#!/bin/bash
NAME="dropbox"
DOCKERFILE="janeczku/dropbox:latest"

if [ ! -d "/mnt/dropbox" ]; then
        mkdir -p /mnt/dropbox
fi

RUNNING=$(docker inspect --format="{{ .State.Running }}" $NAME 2> /dev/null)
if [ "$RUNNING" != "true" ]; then
        docker pull $DOCKERFILE
        docker run -d --restart=always -h $NAME --name=$NAME -v /src/dropbox/conf:/dbox/.dropbox -v /mnt/dropbox:/dbox/Dropbox $DOCKERFILE
fi

if [ "$1" == "logs" ]; then
        docker logs dropbox
else
        docker exec -it dropbox dropbox $1
fi

Does anything pop out at you?

inotify.max_user_watches

This is a common problem with Dropbox on linux where there are lots of folders. Please include the fix.

Unable to monitor entire Dropbox folder hierarchy. Please run "echo fs.inotify.max_user_watches=100000 | sudo tee -a /etc/sysctl.conf; sudo sysctl -p" and restart Dropbox to fix the problem.

Cannot link Dropbox business account when using it in docker

Dropbox recently sent an email saying

On October 15, Dropbox is ending support for Ubuntu 13.10 and below, and Fedora 20 and below. You must have glibc 2.19 or higher to continue using the Dropbox desktop application.

To get around this problem, I installed docker and ran Dropbox in a docker container. I used instructions from here. After successfully installing dropbox. I needed to login to my account/link my computer to the dropbox account

The log file from dropbox said to go to

Please visit https://www.dropbox.com/cli_link_nonce?nonce=testingtest to link this device.

However the linked dropbox website asked me to

go back to the Dropbox installer and enter the following link code: resttest

I do not know how to input the code to the dropbox running in the docker container .

libatomic missing, required by 85.4.155

Latest   : 85.4.155
Installed: 85.4.155
Traceback (most recent call last):
  File "dropbox/client/main.pyc", line 7919, in main
  File "dropbox/client/main.pyc", line 7843, in main_startup
  File "dropbox/client/main.pyc", line 942, in __init__
  File "dropbox/sync_engine_boundary/factory.pyc", line 147, in make_default_file_system
  File "dropbox/sync_engine_boundary/factory.pyc", line 99, in __init__
  File "dropbox/sync_engine_boundary/factory.pyc", line 118, in _initialize_classes
  File "dropbox/sync_engine/nucleus/classic_client/sync_engine.pyc", line 276, in <module>
  File "dropbox/sync_engine/nucleus/classic_client/thin_adapter/in_proc.pyc", line 98, in <module>
  File "dropbox/sync_engine/nucleus/classic_client/wrapped_thin_client.pyc", line 26, in <module>
  File "dropbox/sync_engine/nucleus/thin_client/client.pyc", line 28, in <module>
  File "dropbox/foundation/metrics/amp/remote_sink.pyc", line 10, in <module>
ImportError: libatomic.so.1: 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 7919, in main\n', '  File "dropbox/client/main.pyc", line 7843, in main_startup\n', '  File "dropbox/client/main.pyc", line 942, in __init__\n', '  File "dropbox/sync_engine_boundary/factory.pyc", line 147, in make_default_file_system\n', '  File "dropbox/sync_engine_boundary/factory.pyc", line 99, in __init__\n', '  File "dropbox/sync_engine_boundary/factory.pyc", line 118, in _initialize_classes\n', '  File "dropbox/sync_engine/nucleus/classic_client/sync_engine.pyc", line 276, in <module>\n', '  File "dropbox/sync_engine/nucleus/classic_client/thin_adapter/in_proc.pyc", line 98, in <module>\n', '  File "dropbox/sync_engine/nucleus/classic_client/wrapped_thin_client.pyc", line 26, in <module>\n', '  File "dropbox/sync_engine/nucleus/thin_client/client.pyc", line 28, in <module>\n', '  File "dropbox/foundation/metrics/amp/remote_sink.pyc", line 10, in <module>\n', 'ImportError: libatomic.so.1: cannot open shared object file: No such file or directory\n'] (error 3)

Dropbox not working

Yesterday, the dropbox in the container was updated to version 85.4.155. And it does not start anymore. CentOS 7.
Error: ImportError: libatomic.so.1: cannot open shared object file: No such file or directory.

Detailed:
!! dropbox: fatal python exception:
['Traceback (most recent call last):\n', ' File "dropbox/client/main.pyc", line 7919, in main\n', ' File "dropbox/client/main.pyc", line 7843, in main_startup\n', ' File "dropbox/client/main.pyc", line 942, in init\n', ' File "dropbox/sync_engine_boundary/factory.pyc", line 147, in make_default_file_system\n', ' File "dropbox/sync_engine_boundary/factory.pyc", line 99, in init\n', ' File "dropbox/sync_engine_boundary/factory.pyc", line 118, in _initialize_classes\n', ' File "dropbox/sync_engine/nucleus/classic_client/sync_engine.pyc", line 276, in \n', ' File "dropbox/sync_engine/nucleus/classic_client/thin_adapter/in_proc.pyc", line 98, in \n', ' File "dropbox/sync_engine/nucleus/classic_client/wrapped_thin_client.pyc", line 26, in \n', ' File "dropbox/sync_engine/nucleus/thin_client/client.pyc", line 28, in \n', ' File "dropbox/foundation/metrics/amp/remote_sink.pyc", line 10, in \n', 'ImportError: libatomic.so.1: cannot open shared object file: No such file or directory\n'] (error 3)

Multiple Instances

Sorry, this may be more of a question than an issue. Is it possible to run multiple instances of this container and link each to different Dropbox accounts? Obviously, the instances will need to use independent volumes, at least for configuration.

I ask because the Linux desktop client does not support multiple accounts as described here:

https://www.dropboxforum.com/t5/Installation-and-desktop-app/Linux-support-for-multiple-accounts/td-p/190123/page/4

So I was wondering whether through docker you've effectively fooled the client into thinking each instance is a unique host or whether all instances are identified as the same effective host to Dropbox.

Thanks!

Dropbox throttled?

Hey everyone.

Has anyone else seen a problem with dropbox slowing to a crawl since the 13th/14th Feb?

Sync status remains at 2+ days:

[root@lamarque src]# dropbox status
Syncing "agi-bin" โ€ข 2+ days
Indexing "agi-bin" (2+ days)

Installed version: 91.4.548

Nothing in docker's logs to suggest an issue.

Virtual host version:

FROM debian:stretch

top shows dropbox not using much CPU.

3 servers all had the issue at the same time. A 4th server, also with the same docker file is having no issues.

Is anyone else having a similar problem?

Many thanks,

Ray

Start as root

for some reasons (describe below), I need to test as root user dropbox, is there a simple way to do that?

Reasons:

  • I have started a container with --volumes-from=another_data_container on host A.

  • another_data_container was writing file as uid 1000 gid 1000.

  • I have added a group with gid 1000 in dropbox, and added dropbox user into the group.

  • Into another_data_container, I have updated folders permissions using find . -type d -exec chmod g+rwx and files permissions usings find . -type f -exec chmod g+rw

  • I linked my dropbox account

  • file got synced to dropbox (without adding group permissions, dropbox wasn't allowed to upload those files)

  • I have started a container with --volumes-from=another_data_container on host B

  • Dropbox container from host B should download another_data_container files but I have the following error :

        dropbox status
        Syncing (34 files remaining)
        Downloading 34 files...
       Can't sync "myfile.txt" (permission denied)
    

Permissions of this file as been uploaded to dropbox with UID 1000/GID 1000 so for me it should work.

standard_init_linux.go:207: exec user process caused "exec format error"

Attempts to use the dropbox service results in an error:

# docker run  --name=dropbox janeczku/dropbox
standard_init_linux.go:207: exec user process caused "exec format error"

System info:

# docker -v
Docker version 18.09.1, build 4c52b90

# uname -a
Linux torrent 4.19.0-6-686-pae #1 SMP Debian 4.19.67-2+deb10u1 (2019-09-20) i686 GNU/Linux

dropbox won't start due to missing libglapi.so.0

# sudo docker run --rm --name=dropbox janeczku/dropbox
Unable to find image 'janeczku/dropbox:latest' locally
latest: Pulling from janeczku/dropbox
6a5a5368e0c2: Pull complete 
eb0746ae806a: Pull complete 
0d5af593ff41: Pull complete 
f684e23016fe: Pull complete 
ad25e946dda5: Pull complete 
1420ad85d40d: Pull complete 
Digest: sha256:8931b2b86d64148fe60c1d9fa4d169ac1bfe47eb3c88daa032520243bc93a170
Status: Downloaded newer image for janeczku/dropbox:latest
DBOX_UID variable not specified, defaulting to dropbox user id (1000)
DBOX_GID variable not specified, defaulting to dropbox user group id (1000)
Checking for latest Dropbox version...
Latest   : 94.4.384
Installed: 11.4.21
Downloading Dropbox v94.4.384...
######################################################################## 100.0%
Installing new version...
Dropbox updated to v94.4.384
Starting dropboxd (94.4.384)...
dropbox: locating interpreter
!! dropbox: failed to create log file (Permission denied)!
dropbox: initializing
dropbox: initializing python 3.7.5
dropbox: setting program path '/opt/dropbox/dropbox-lnx.x86_64-94.4.384/dropbox'
dropbox: setting python path '/opt/dropbox/dropbox-lnx.x86_64-94.4.384:/opt/dropbox/dropbox-lnx.x86_64-94.4.384/python-packages.zip'
dropbox: python initialized
dropbox: running dropbox
dropbox: setting args
dropbox: applying overrides
dropbox: running main script
dropbox: load fq extension '/opt/dropbox/dropbox-lnx.x86_64-94.4.384/cryptography.hazmat.bindings._constant_time.cpython-37m-x86_64-linux-gnu.so'
dropbox: load fq extension '/opt/dropbox/dropbox-lnx.x86_64-94.4.384/cryptography.hazmat.bindings._openssl.cpython-37m-x86_64-linux-gnu.so'
dropbox: load fq extension '/opt/dropbox/dropbox-lnx.x86_64-94.4.384/cryptography.hazmat.bindings._padding.cpython-37m-x86_64-linux-gnu.so'
dropbox: load fq extension '/opt/dropbox/dropbox-lnx.x86_64-94.4.384/psutil._psutil_linux.cpython-37m-x86_64-linux-gnu.so'
dropbox: load fq extension '/opt/dropbox/dropbox-lnx.x86_64-94.4.384/psutil._psutil_posix.cpython-37m-x86_64-linux-gnu.so'
dropbox: load fq extension '/opt/dropbox/dropbox-lnx.x86_64-94.4.384/apex._apex.cpython-37m-x86_64-linux-gnu.so'
dropbox: load fq extension '/opt/dropbox/dropbox-lnx.x86_64-94.4.384/tornado.speedups.cpython-37m-x86_64-linux-gnu.so'
dropbox: load fq extension '/opt/dropbox/dropbox-lnx.x86_64-94.4.384/PyQt5.QtWidgets.cpython-37m-x86_64-linux-gnu.so'
Traceback (most recent call last):
  File "dropbox/client/main.pyc", line 262, in <module>
  File "dropbox/foundation/navigation_service/factory.pyc", line 19, in <module>
  File "dropbox/foundation/navigation_service/navigation_service_impl.pyc", line 57, in <module>
  File "dropbox/foundation/html_views/electron/manager_factory.pyc", line 13, in <module>
  File "dropbox/foundation/html_views/local/common/manager.pyc", line 33, in <module>
  File "dropbox/client/features/model_registry.pyc", line 13, in <module>
  File "dropbox/client/features/generated_models.pyc", line 279, in <module>
  File "dropbox/client/features/previews/view_anchor.pyc", line 104, in <module>
  File "<_bootstrap_overrides>", line 153, in load_module
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)

Error when updated dropbox

When the container starts it downloads a newer dropbox and tries to run it:

Checking for latest Dropbox version...
Latest   : 18.4.32
Installed: 18.4.32
Dropbox is up-to-date
Starting dropboxd (18.4.32)...
Traceback (most recent call last):
  File "<string>", line 6, in <module>
  File "__main__.py", line 3, in <module>
ImportError: No module named os

Unable to monitor entire Dropbox folder hierarchy

Hi,
I have a problem docker logs shows me the message

Unable to monitor entire Dropbox folder hierarchy. Please run "echo fs.inotify.max_user_watches=100000 | sudo tee -a /etc/sysctl.conf; sudo sysctl -p" and restart Dropbox to fix the problem.

However if I execute the command with docker exec ist says me it is unable to find user root. Executing just the first portion (without sudo sysctl -p) works but has no effect. (even after restarting the container)

[root@hostname ~]# docker exec cloud_dropbox_1 echo "fs.inotify.max_user_watches=100000 | sudo tee -a /etc/sysctl.conf; sudo sysctl -p"
unable to find user root: no matching entries in passwd file

Anybody able to help me?

Regards
David

Dropbox will soon require ext4 - container currently using ext2

I've been getting emails recently, which I've just realised are valid, that Dropbox will soon no longer support anything but ext4 (best source from those emails)

The container at least is currently showing:
root@host:/dbox/Dropbox# fsck -N /dev/sdb1 fsck from util-linux 2.25.2 [/sbin/fsck.ext2 (1) -- /dev/sdb1] fsck.ext2 /dev/sdb1 root@host:/dbox/Dropbox#

I'll research as soon as I can how to make the change as I think this is likely more Docker related, but just in case I don't...

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.