mirror of
https://github.com/abraunegg/onedrive
synced 2024-05-10 01:36:39 +02:00
Update docker md (#977)
* adds uid gid to first run to avoid conflicts. removes --restart because only first run * adds docker-compose example * added some info on UID / GID Co-authored-by: Floris Remmen <floris.remmen@gmail.com>
This commit is contained in:
parent
578d560a62
commit
790c75b5cc
|
@ -34,11 +34,12 @@ The second docker volume is for your data folder and is created in the next step
|
|||
|
||||
### 3. First run
|
||||
|
||||
Onedrive needs to be authorized with your Microsoft account. This is achieved by running docker in interactive mode. Run the docker image with the two commands below and **make sure to change `onedriveDir` to the onedrive data directory on your filesystem (e.g. `"/home/abraunegg/OneDrive"`)**
|
||||
Onedrive needs to be authorized with your Microsoft account. This is achieved by running docker in interactive mode. Run the docker image with the two commands below and **make sure to change `onedriveDir` to the onedrive data directory on your filesystem (e.g. `"/home/abraunegg/OneDrive"`)**.
|
||||
Additionally, the user id and group id should be added to remove any potential user conflicts, denoted by the environment variables `${ONEDRIVE_UID}` and `${ONEDRIVE_GID}`.
|
||||
|
||||
```bash
|
||||
onedriveDir="${HOME}/OneDrive"
|
||||
docker run -it --restart unless-stopped --name onedrive -v onedrive_conf:/onedrive/conf -v "${onedriveDir}:/onedrive/data" driveone/onedrive
|
||||
docker run -it --name onedrive -v onedrive_conf:/onedrive/conf -v "${onedriveDir}:/onedrive/data" -e "ONEDRIVE_UID:${ONEDRIVE_UID}" -e "ONEDRIVE_GID:${ONEDRIVE_GID}" driveone/onedrive
|
||||
```
|
||||
|
||||
- You will be asked to open a specific link using your web browser
|
||||
|
@ -81,7 +82,29 @@ docker rm -f onedrive
|
|||
```
|
||||
## Advanced Setup
|
||||
|
||||
### 5. Edit the config
|
||||
### 5. Docker-compose
|
||||
|
||||
Also supports docker-compose schemas > 3.
|
||||
In the following example it is assumed you have a `onedriveDir` environment variable and a `onedrive_conf` volume.
|
||||
However, you can also use bind mounts for the configuration folder, e.g. `export ONEDRIVE_CONF="${HOME}/OneDriveConfig"`.
|
||||
|
||||
```
|
||||
version: "3"
|
||||
services:
|
||||
onedrive:
|
||||
image: driveone/onedrive
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
- ONEDRIVE_UID=${PUID}
|
||||
- ONEDRIVE_GID=${PGID}
|
||||
volumes:
|
||||
- onedrive_conf:/onedrive/conf
|
||||
- ${onedriveDir}:/onedrive/data
|
||||
```
|
||||
|
||||
Note that you still have to perform step 3: First Run.
|
||||
|
||||
### 6. Edit the config
|
||||
|
||||
Onedrive should run in default configuration, however you can change your configuration by placing a custom config file in the `onedrive_conf` docker volume. First download the default config from [here](https://raw.githubusercontent.com/abraunegg/onedrive/master/config)
|
||||
Then put it into your onedrive_conf volume path, which can be found with:
|
||||
|
@ -94,7 +117,7 @@ Or you can map your own config folder to the config volume. Make sure to copy al
|
|||
|
||||
The detailed document for the config can be found here: [additional-configuration](https://github.com/abraunegg/onedrive#additional-configuration)
|
||||
|
||||
### 6. Sync multiple accounts
|
||||
### 7. Sync multiple accounts
|
||||
|
||||
There are many ways to do this, the easiest is probably to
|
||||
1. Create a second docker config volume (replace `Work` with your desired name): `docker volume create onedrive_conf_Work`
|
||||
|
|
Loading…
Reference in a new issue