title: Dropbox in Docker
body: <p>I would like to run Dropbox inside Docker container. This way I could sync data with docker by  uploading it to Dropbox. And also maintain data backup, that will be useful when running new versions of docker images.</p>
  
  <p>Created this simple Dockerfile</p>
  
  <pre><code>FROM phusion/baseimage:0.9.15
  
  #Install wget
  RUN apt-get update &amp;&amp; \
      apt-get -f install &amp;&amp; \
      apt-get install -y wget
  
  #Install Dropbox
  RUN mkdir /usr/local/dropbox &amp;&amp; \
      cd /usr/local/dropbox &amp;&amp; \
      wget -O - "https://www.dropbox.com/download?plat=lnx.x86_64" | tar xzf -
  
  RUN mkdir /etc/service/dropbox
  ADD ./dropbox.sh /etc/service/dropbox/run
  
  # Clean up APT when done.
  RUN apt-get clean &amp;&amp; rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
  
  # Use baseimage-docker's init system.
  CMD ["/sbin/my_init"]
  </code></pre>
  
  <p>And service file dropbox.sh</p>
  
  <pre><code>#!/bin/sh
  exec /usr/local/dropbox/.dropbox-dist/dropboxd
  </code></pre>
  
  <p>After building and running Docker image, Dropbox says:
  <strong>This computer isn't linked to any Dropbox account...</strong></p>
  
  <p>and provides link to associate Dropbox account with current computer.
  After linking, I see a welcome message and data is syncyd inside /root/Dropbox folder.</p>
  
  <p>I commit docker changes </p>
  
  <pre><code>sudo docker commit `sudo docker ps -l -q` imagename
  </code></pre>
  
  <p>But when killing docker container and running it again Dropbox insists:
  <strong>This computer isn't linked to any Dropbox account...</strong></p>
  
  <p>I confirm that inside container, folder /root/Dropbox exists, and data is there, synced during previous container execution. But my container lost link to Dropbox, and needs to be linked again.</p>
  
  <p>What am I missing? How to persist Dropbox-Docker_container link between container executions?</p>