Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possibility to run the script via docker #344

Merged
merged 1 commit into from Dec 29, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 12 additions & 0 deletions Dockerfile
@@ -0,0 +1,12 @@
FROM alpine:3.5
MAINTAINER peez@stiffi.de

RUN apk add --no-cache bash curl
COPY / /opt/dropbox_uploader
RUN mkdir -p /config && mkdir -p /workdir

VOLUME /config /workdir

WORKDIR /workdir

ENTRYPOINT ["/opt/dropbox_uploader/dropbox_uploader.sh", "-f", "/config/dropbox_uploader.conf"]
12 changes: 12 additions & 0 deletions README.md
Expand Up @@ -236,6 +236,18 @@ andrea@Dropbox:/$ ls
andrea@DropBox:/ServerBackup$ get notes.txt
```

## Running as Docker Container
If you have installed docker on your system and don't want to deal with downloading the script and ensuring the correct curl versions etc., you can run Dropbox-Uploader via docker as well:
```bash
andrea@Dropbox:/$ docker run -it --rm --user=$(id -u):$(id -g) -v <LOCAL_CONFIG_PATH>:/config -v <YOUR_DATA_DIR_MOUNT> peez/dropbox-uploader <Arguments>
```
This will store the auth token information in the given local directory in `<LOCAL_CONFIG_PATH>`. To ensure access to your mounted directories it can be important to pass a UID and GID to the docker deamon (as stated in the example by the --user argument)

Using the script with docker makes it also possible to run the script even on windows machines.

To use a proxy, just set the mentioned environment variables via the docker `-e` parameter.


## Donations

If you want to support this project, please consider donating:
Expand Down