mirror of
https://github.com/jupyter/docker-stacks.git
synced 2025-10-18 15:32:56 +00:00
Fix usage for -w in docs (#1967)
This commit is contained in:
@@ -37,7 +37,7 @@ You do so by passing arguments to the `docker run` command.
|
|||||||
The default value is `jovyan`.
|
The default value is `jovyan`.
|
||||||
Setting `NB_USER` refits the `jovyan` default user and ensures that the desired user has the correct file permissions
|
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 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`.
|
and set the environment variable `-e CHOWN_HOME=yes`.
|
||||||
|
|
||||||
_Example usage:_
|
_Example usage:_
|
||||||
@@ -48,7 +48,7 @@ You do so by passing arguments to the `docker run` command.
|
|||||||
--user root \
|
--user root \
|
||||||
-e NB_USER="my-username" \
|
-e NB_USER="my-username" \
|
||||||
-e CHOWN_HOME=yes \
|
-e CHOWN_HOME=yes \
|
||||||
-w "/home/${NB_USER}" \
|
-w "/home/my-username" \
|
||||||
jupyter/base-notebook
|
jupyter/base-notebook
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@@ -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 NB_GID=1234 \
|
||||||
-e CHOWN_HOME=yes \
|
-e CHOWN_HOME=yes \
|
||||||
-e CHOWN_HOME_OPTS="-R" \
|
-e CHOWN_HOME_OPTS="-R" \
|
||||||
-w "/home/${NB_USER}" \
|
-w "/home/callisto" \
|
||||||
-v "${PWD}"/test:/home/callisto/work \
|
-v "${PWD}"/test:/home/callisto/work \
|
||||||
jupyter/minimal-notebook
|
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 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
|
- `-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)
|
(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
|
```{admonition} Additional notes
|
||||||
In the example above, the `-v` flag is used to mount the local volume onto the new user's `/home` directory.
|
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 NB_GID="$(id -g)" \
|
||||||
-e CHOWN_HOME=yes \
|
-e CHOWN_HOME=yes \
|
||||||
-e CHOWN_HOME_OPTS="-R" \
|
-e CHOWN_HOME_OPTS="-R" \
|
||||||
-w "/home/${NB_USER}" \
|
-w "/home/callisto" \
|
||||||
-v "${PWD}"/test:/home/callisto/work \
|
-v "${PWD}"/test:/home/callisto/work \
|
||||||
jupyter/minimal-notebook
|
jupyter/minimal-notebook
|
||||||
```
|
```
|
||||||
|
Reference in New Issue
Block a user