Fix usage for -w in docs (#1967)

This commit is contained in:
Ayaz Salikhov
2023-08-13 18:43:17 +04:00
committed by GitHub
parent 4f74f9a934
commit afe6311991
2 changed files with 5 additions and 5 deletions

View File

@@ -37,7 +37,7 @@ You do so by passing arguments to the `docker run` command.
The default value is `jovyan`.
Setting `NB_USER` refits the `jovyan` default user and ensures that the desired user has the correct file permissions
for the new home directory created at `/home/<username>`.
For this option to take effect, you **must** run the container with `--user root`, set the working directory `-w "/home/${NB_USER}"`
For this option to take effect, you **must** run the container with `--user root`, set the working directory `-w "/home/<username>"`
and set the environment variable `-e CHOWN_HOME=yes`.
_Example usage:_
@@ -48,7 +48,7 @@ You do so by passing arguments to the `docker run` command.
--user root \
-e NB_USER="my-username" \
-e CHOWN_HOME=yes \
-w "/home/${NB_USER}" \
-w "/home/my-username" \
jupyter/base-notebook
```

View File

@@ -142,7 +142,7 @@ If you have also **created a new user**, you might be experiencing any of the fo
-e NB_GID=1234 \
-e CHOWN_HOME=yes \
-e CHOWN_HOME_OPTS="-R" \
-w "/home/${NB_USER}" \
-w "/home/callisto" \
-v "${PWD}"/test:/home/callisto/work \
jupyter/minimal-notebook
@@ -162,7 +162,7 @@ If you have also **created a new user**, you might be experiencing any of the fo
- `-e NB_UID=1234` and `-e NB_GID=1234`: will set the `UID` and `GID` of the new user (`callisto`) to `1234`
- `-e CHOWN_HOME_OPTS="-R"` and `-e CHOWN_HOME=yes`: ensure that the new user is the owner of the `/home` directory and subdirectories
(setting `CHOWN_HOME_OPTS="-R` will ensure this change is applied recursively)
- `-w "/home/${NB_USER}"` sets the working directory to be the new user's home
- `-w "/home/callisto"` sets the working directory to be the new user's home
```{admonition} Additional notes
In the example above, the `-v` flag is used to mount the local volume onto the new user's `/home` directory.
@@ -185,7 +185,7 @@ If you have also **created a new user**, you might be experiencing any of the fo
-e NB_GID="$(id -g)" \
-e CHOWN_HOME=yes \
-e CHOWN_HOME_OPTS="-R" \
-w "/home/${NB_USER}" \
-w "/home/callisto" \
-v "${PWD}"/test:/home/callisto/work \
jupyter/minimal-notebook
```