mirror of
https://github.com/abraunegg/onedrive
synced 2024-05-03 06:23:16 +02:00
Update Docker.md (#1841)
* Ensure the **ONEDRIVE_DATA_DIR** folder exists before running the container * Silence the stderr messages
This commit is contained in:
parent
c63b390f14
commit
7ff077efd8
|
@ -173,13 +173,15 @@ docker run -it --restart unless-stopped --name onedrive_Work -v onedrive_conf_Wo
|
|||
If you are experienced with docker and onedrive, you can use the following script:
|
||||
|
||||
```bash
|
||||
# Update ONEDRIVE_DATA_DIR with correct existing OneDrive directory path
|
||||
# Update ONEDRIVE_DATA_DIR with correct OneDrive directory path
|
||||
ONEDRIVE_DATA_DIR="${HOME}/OneDrive"
|
||||
# Create directory if non-existant
|
||||
mkdir -p ${ONEDRIVE_DATA_DIR}
|
||||
|
||||
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 inspect onedrive_conf > /dev/null 2>&1 || { docker volume create onedrive_conf; firstRun='-it'; }
|
||||
docker inspect onedrive > /dev/null 2>&1 && docker rm -f onedrive
|
||||
docker run $firstRun --restart unless-stopped --name onedrive -v onedrive_conf:/onedrive/conf -v "${ONEDRIVE_DATA_DIR}:/onedrive/data" driveone/onedrive:latest
|
||||
```
|
||||
|
||||
|
|
Loading…
Reference in a new issue