You can find an auto-deployed image using the command
docker pull electroid/dropbox.
Currently, in order to deploy Dropbox into a Docker environment, you need to manually configure the entire host machine. Now, you can provision a Dropbox container with just an access token.
You will need a recent version of JDK 8 as well as Maven installed on your computer. To build the program, just run
mvn clean install and the jar should appear at
target/dropbox-sync-1.0-SNAPSHOT.jar. After building is complete, you may also create a Dockerfile using the command
docker build -t dropbox .
If you want your image to auto deploy you can set up a container builder to listen to changes in your Github repository. When setting up, you must reference the
build.yml file in the repository, so the build program knows how to create your
Each container requires three environment variables to be defined:
- DROPBOX_FOLDER_LOCAL (optional, "/dropbox")
- DROPBOX_FOLDER_REMOTE (optional, "")
- DROPBOX_OAUTH_TOKEN (required)
Here is an example of running a solo container using Docker:
docker run --volume=your_own_host_path:$DROPBOX_FOLDER_LOCAL gcr.io/$PROJECT_ID/dropbox:master
Here is an example of a StatefulSet deployment using Kubernetes:
apiVersion: apps/v1 kind: StatefulSet metadata: name: dropbox spec: serviceName: dropbox selector: matchLabels: role: dropbox template: metadata: labels: role: dropbox spec: containers: - name: dropbox-sidecar image: gcr.io/$PROJECT_ID/dropbox:master envFrom: - secretRef: name: dropbox-secret resources: requests: cpu: 100m memory: 200Mi limits: cpu: 100m memory: 200Mi volumeMounts: - name: dropbox mountPath: /dropbox:rw volumes: - name: dropbox hostPath: path: /dropbox