Skip to content

Instantly share code, notes, and snippets.

@jmooo
Created October 23, 2018 20:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jmooo/c3f211a48292dd1aeb176ec258e32837 to your computer and use it in GitHub Desktop.
Save jmooo/c3f211a48292dd1aeb176ec258e32837 to your computer and use it in GitHub Desktop.
Run Dropbox in a Docker container via systemd
[Unit]
Description=Dropbox Service
After=docker.service network.target
[Service]
Type=simple
User=MY_USERNAME
ExecStartPre=-/usr/bin/docker rm dropbox
ExecStart=/usr/bin/docker run \
--name=dropbox \
-v /home/MY_USERNAME/Dropbox:/dbox/Dropbox \
-v /home/MY_USERNAME/.dropbox:/dbox/.dropbox \
-e DBOX_UID=MY_UID \
-e DBOX_GID=MY_GID \
janeczku/dropbox
Restart=always
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment