mirror of
https://github.com/jupyter/docker-stacks.git
synced 2025-10-18 07:22:57 +00:00
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
This commit is contained in:
@@ -23,14 +23,14 @@ docker run -d -p 8888:8888 jupyter/base-notebook start-notebook.sh --NotebookApp
|
|||||||
|
|
||||||
## Docker Options
|
## Docker Options
|
||||||
|
|
||||||
You may instruct the `start-notebook.sh` script to customize the container environment before launching the notebook server. You do so by passing
|
You may instruct the `start-notebook.sh` script to customize the container environment before launching the notebook server. You do so by passing
|
||||||
arguments to the `docker run` command.
|
arguments to the `docker run` command.
|
||||||
|
|
||||||
- `-e NB_USER=<username>` - The desired username and associated home folder. Default value is `jovyan`. Setting `NB_USER` refits the `jovyan`
|
- `-e NB_USER=<username>` - The desired username and associated home folder. 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 that gets created at
|
default user and ensures that the desired user has the correct file permissions for the new home directory that gets 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}`
|
`/home/<username>`. For this option to take effect you must run the container with `--user root`, set the working directory `-w /home/${NB_USER}`
|
||||||
and set the environment variable `-e CHOWN_HOME=yes`.
|
and set the environment variable `-e CHOWN_HOME=yes`.
|
||||||
|
|
||||||
Example Usage:
|
Example Usage:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
@@ -38,8 +38,8 @@ arguments to the `docker run` command.
|
|||||||
```
|
```
|
||||||
|
|
||||||
- `-e NB_UID=1000` - Instructs the startup script to switch the numeric user ID of `${NB_USER}` to the given value. Default value is `1000`.
|
- `-e NB_UID=1000` - Instructs the startup script to switch the numeric user ID of `${NB_USER}` to the given value. Default value is `1000`.
|
||||||
This feature is useful when mounting host volumes with specific owner permissions. For this option to take effect, you must run the container
|
This feature is useful when mounting host volumes with specific owner permissions. For this option to take effect, you must run the container
|
||||||
with `--user root`. (The startup script will `su ${NB_USER}` after adjusting the user ID.) You might consider using the modern Docker options
|
with `--user root`. (The startup script will `su ${NB_USER}` after adjusting the user ID.) You might consider using the modern Docker options
|
||||||
`--user` and `--group-add` instead. See bullet points regarding `--user` and `--group-add`.
|
`--user` and `--group-add` instead. See bullet points regarding `--user` and `--group-add`.
|
||||||
|
|
||||||
- `-e NB_GID=100` - Instructs the startup script to change the primary group of`${NB_USER}` to `${NB_GID}`
|
- `-e NB_GID=100` - Instructs the startup script to change the primary group of`${NB_USER}` to `${NB_GID}`
|
||||||
@@ -57,8 +57,8 @@ arguments to the `docker run` command.
|
|||||||
|
|
||||||
- `-e NB_UMASK=<umask>` - Configures Jupyter to use a different `umask` value from default, i.e. `022`.
|
- `-e NB_UMASK=<umask>` - Configures Jupyter to use a different `umask` value from default, i.e. `022`.
|
||||||
For example, if setting `umask` to `002`, new files will be readable and writable by group members instead of just writable by the owner.
|
For example, if setting `umask` to `002`, new files will be readable and writable by group members instead of just writable by the owner.
|
||||||
Wikipedia has a good article about [`umask`](https://en.wikipedia.org/wiki/Umask). While the default `umask` value should be sufficient for most use cases, you can set the `NB_UMASK` value to fit your requirements. _Note that `NB_UMASK` when set only applies to the Jupyter process itself - you cannot use it to set a
|
Wikipedia has a good article about [`umask`](https://en.wikipedia.org/wiki/Umask). While the default `umask` value should be sufficient for most use cases, you can set the `NB_UMASK` value to fit your requirements. _Note that `NB_UMASK` when set only applies to the Jupyter process itself - you cannot use it to set a
|
||||||
`umask` for additional files created during run-hooks. For example, via `pip` or `conda`. If you need to set a `umask` for these you must set `umask` for
|
`umask` for additional files created during run-hooks. For example, via `pip` or `conda`. If you need to set a `umask` for these you must set `umask` for
|
||||||
each command._
|
each command._
|
||||||
|
|
||||||
- `-e CHOWN_HOME=yes` - Instructs the startup script to change the `${NB_USER}` home directory owner and group to the current value of `${NB_UID}` and `${NB_GID}`.
|
- `-e CHOWN_HOME=yes` - Instructs the startup script to change the `${NB_USER}` home directory owner and group to the current value of `${NB_UID}` and `${NB_GID}`.
|
||||||
|
Reference in New Issue
Block a user