Update Docker.md (#2409)

* Update Docker document to detail to use 'edge' to align to documentation
This commit is contained in:
abraunegg 2023-06-03 07:36:47 +10:00 committed by GitHub
parent 3b8d7b3b1a
commit 669a21747b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -18,7 +18,9 @@ The instructions below have been validated on:
* Red Hat Enterprise Linux 8.x * Red Hat Enterprise Linux 8.x
* Ubuntu Server 22.04 * Ubuntu Server 22.04
The instructions below will utilise the 'latest' tag, however this can be substituted for any of the other docker tags from the table above if desired. The instructions below will utilise the 'edge' tag, however this can be substituted for any of the other docker tags such as 'latest' from the table above if desired.
The 'edge' Docker Container will align closer to all documentation and features, where as 'latest' is the release version from a static point in time. The 'latest' tag however may contain bugs and/or issues that will have been fixed, and those fixes are contained in 'edge'.
Additionally there are specific version release tags for each release. Refer to https://hub.docker.com/r/driveone/onedrive/tags for any other Docker tags you may be interested in. Additionally there are specific version release tags for each release. Refer to https://hub.docker.com/r/driveone/onedrive/tags for any other Docker tags you may be interested in.
@ -34,7 +36,7 @@ Once the above 4 steps are complete and you can successfully run `docker run hel
## Pulling and Running the Docker Image ## Pulling and Running the Docker Image
### 1. Pull the image ### 1. Pull the image
```bash ```bash
docker pull driveone/onedrive:latest docker pull driveone/onedrive:edge
``` ```
**NOTE:** SELinux context needs to be configured or disabled for Docker to be able to write to OneDrive host directory. **NOTE:** SELinux context needs to be configured or disabled for Docker to be able to write to OneDrive host directory.
@ -72,7 +74,7 @@ docker run -it --name onedrive -v onedrive_conf:/onedrive/conf \
-v "${ONEDRIVE_DATA_DIR}:/onedrive/data" \ -v "${ONEDRIVE_DATA_DIR}:/onedrive/data" \
-e "ONEDRIVE_UID=${ONEDRIVE_UID}" \ -e "ONEDRIVE_UID=${ONEDRIVE_UID}" \
-e "ONEDRIVE_GID=${ONEDRIVE_GID}" \ -e "ONEDRIVE_GID=${ONEDRIVE_GID}" \
driveone/onedrive:latest driveone/onedrive:edge
``` ```
**Important:** The 'target' folder of `ONEDRIVE_DATA_DIR` must exist before running the Docker container, otherwise, Docker will create the target folder, and the folder will be given 'root' permissions, which then causes the Docker container to fail upon startup with the following error message: **Important:** The 'target' folder of `ONEDRIVE_DATA_DIR` must exist before running the Docker container, otherwise, Docker will create the target folder, and the folder will be given 'root' permissions, which then causes the Docker container to fail upon startup with the following error message:
```bash ```bash
@ -90,7 +92,7 @@ docker run -it --name onedrive -v onedrive_conf:/onedrive/conf \
-v "${ONEDRIVE_DATA_DIR}:/onedrive/data" \ -v "${ONEDRIVE_DATA_DIR}:/onedrive/data" \
-e "ONEDRIVE_UID=${ONEDRIVE_UID}" \ -e "ONEDRIVE_UID=${ONEDRIVE_UID}" \
-e "ONEDRIVE_GID=${ONEDRIVE_GID}" \ -e "ONEDRIVE_GID=${ONEDRIVE_GID}" \
driveone/onedrive:latest driveone/onedrive:edge
``` ```
When the Docker container successfully starts: When the Docker container successfully starts:
@ -144,7 +146,7 @@ However, you can also use bind mounts for the configuration folder, e.g. `export
version: "3" version: "3"
services: services:
onedrive: onedrive:
image: driveone/onedrive:latest image: driveone/onedrive:edge
restart: unless-stopped restart: unless-stopped
environment: environment:
- ONEDRIVE_UID=${PUID} - ONEDRIVE_UID=${PUID}
@ -175,7 +177,7 @@ There are many ways to do this, the easiest is probably to
``` ```
export ONEDRIVE_DATA_DIR_WORK="/home/abraunegg/OneDriveWork" export ONEDRIVE_DATA_DIR_WORK="/home/abraunegg/OneDriveWork"
mkdir -p ${ONEDRIVE_DATA_DIR_WORK} mkdir -p ${ONEDRIVE_DATA_DIR_WORK}
docker run -it --restart unless-stopped --name onedrive_Work -v onedrive_conf_Work:/onedrive/conf -v "${ONEDRIVE_DATA_DIR_WORK}:/onedrive/data" driveone/onedrive:latest docker run -it --restart unless-stopped --name onedrive_Work -v onedrive_conf_Work:/onedrive/conf -v "${ONEDRIVE_DATA_DIR_WORK}:/onedrive/data" driveone/onedrive:edge
``` ```
## Run or update with one script ## Run or update with one script
@ -188,13 +190,12 @@ ONEDRIVE_DATA_DIR="${HOME}/OneDrive"
mkdir -p ${ONEDRIVE_DATA_DIR} mkdir -p ${ONEDRIVE_DATA_DIR}
firstRun='-d' firstRun='-d'
docker pull driveone/onedrive:latest docker pull driveone/onedrive:edge
docker inspect onedrive_conf > /dev/null 2>&1 || { docker volume create onedrive_conf; firstRun='-it'; } 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 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 docker run $firstRun --restart unless-stopped --name onedrive -v onedrive_conf:/onedrive/conf -v "${ONEDRIVE_DATA_DIR}:/onedrive/data" driveone/onedrive:edge
``` ```
## Environment Variables ## Environment Variables
| Variable | Purpose | Sample Value | | Variable | Purpose | Sample Value |
| ---------------- | --------------------------------------------------- |:--------------------------------------------------------------------------------------------------------------------------------:| | ---------------- | --------------------------------------------------- |:--------------------------------------------------------------------------------------------------------------------------------:|
@ -216,23 +217,23 @@ docker run $firstRun --restart unless-stopped --name onedrive -v onedrive_conf:/
### Usage Examples ### Usage Examples
**Verbose Output:** **Verbose Output:**
```bash ```bash
docker container run -e ONEDRIVE_VERBOSE=1 -v onedrive_conf:/onedrive/conf -v "${ONEDRIVE_DATA_DIR}:/onedrive/data" driveone/onedrive:latest docker container run -e ONEDRIVE_VERBOSE=1 -v onedrive_conf:/onedrive/conf -v "${ONEDRIVE_DATA_DIR}:/onedrive/data" driveone/onedrive:edge
``` ```
**Debug Output:** **Debug Output:**
```bash ```bash
docker container run -e ONEDRIVE_DEBUG=1 -v onedrive_conf:/onedrive/conf -v "${ONEDRIVE_DATA_DIR}:/onedrive/data" driveone/onedrive:latest docker container run -e ONEDRIVE_DEBUG=1 -v onedrive_conf:/onedrive/conf -v "${ONEDRIVE_DATA_DIR}:/onedrive/data" driveone/onedrive:edge
``` ```
**Perform a --resync:** **Perform a --resync:**
```bash ```bash
docker container run -e ONEDRIVE_RESYNC=1 -v onedrive_conf:/onedrive/conf -v "${ONEDRIVE_DATA_DIR}:/onedrive/data" driveone/onedrive:latest docker container run -e ONEDRIVE_RESYNC=1 -v onedrive_conf:/onedrive/conf -v "${ONEDRIVE_DATA_DIR}:/onedrive/data" driveone/onedrive:edge
``` ```
**Perform a --resync and --verbose:** **Perform a --resync and --verbose:**
```bash ```bash
docker container run -e ONEDRIVE_RESYNC=1 -e ONEDRIVE_VERBOSE=1 -v onedrive_conf:/onedrive/conf -v "${ONEDRIVE_DATA_DIR}:/onedrive/data" driveone/onedrive:latest docker container run -e ONEDRIVE_RESYNC=1 -e ONEDRIVE_VERBOSE=1 -v onedrive_conf:/onedrive/conf -v "${ONEDRIVE_DATA_DIR}:/onedrive/data" driveone/onedrive:edge
``` ```
**Perform a --logout and re-authenticate:** **Perform a --logout and re-authenticate:**
```bash ```bash
docker container run -it -e ONEDRIVE_LOGOUT=1 -v onedrive_conf:/onedrive/conf -v "${ONEDRIVE_DATA_DIR}:/onedrive/data" driveone/onedrive:latest docker container run -it -e ONEDRIVE_LOGOUT=1 -v onedrive_conf:/onedrive/conf -v "${ONEDRIVE_DATA_DIR}:/onedrive/data" driveone/onedrive:edge
``` ```
## Build instructions ## Build instructions