Created
October 6, 2021 08:47
-
-
Save chbrandt/275e999a0b45c249d121b4b75d6a6960 to your computer and use it in GitHub Desktop.
OneDrive docker container script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Use docker container from https://github.com/abraunegg/onedrive | |
# Detailed instructions at https://github.com/abraunegg/onedrive/blob/master/docs/Docker.md | |
ONEDRIVE_DATA_DIR="${HOME}/OneDrive" | |
ONEDRIVE_UID=`id -u` | |
ONEDRIVE_GID=`id -g` | |
mkdir -p ${ONEDRIVE_DATA_DIR} &> /dev/null | |
firstRun='-d' | |
docker pull driveone/onedrive:latest | |
docker inspect onedrive_conf > /dev/null \ | |
|| { docker volume create onedrive_conf; firstRun='-it'; } | |
docker inspect onedrive > /dev/null \ | |
&& docker rm -f onedrive | |
docker run $firstRun --restart unless-stopped --name onedrive -v onedrive_conf:/onedrive/conf \ | |
-v "${ONEDRIVE_DATA_DIR}:/onedrive/data" \ | |
-e "ONEDRIVE_UID:${ONEDRIVE_UID}" \ | |
-e "ONEDRIVE_GID:${ONEDRIVE_GID}" \ | |
driveone/onedrive:latest |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment