From 66566d9bd02fc8aae9fe0b9ef692fd5f030fbf89 Mon Sep 17 00:00:00 2001 From: Tania Allard Date: Wed, 2 Feb 2022 13:03:39 +0000 Subject: [PATCH] :memo: Improvements to troubleshoot --- docs/using/troubleshooting.md | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/docs/using/troubleshooting.md b/docs/using/troubleshooting.md index aa2af96b..c902c297 100644 --- a/docs/using/troubleshooting.md +++ b/docs/using/troubleshooting.md @@ -117,6 +117,8 @@ In this case the user of the container (`jovyan`) and the owner of the mounted v uid=1234(jovyan) gid=1234(jovyan) groups=1234(jovyan),100(users) ``` + - If you pass a numeric UID, it must be in the range of 0-2147483647 + If you need to specify a different user check the following section in this page. ## Permission issues after changing the UID/GIU and USER in the container @@ -188,7 +190,7 @@ If on top of changing the UID and GID you also **need to create a new user**, yo - `"$(id -u)" and "$(id -g)"` will dynamically assign the `UID` and `GID` of the new user (`callisto`) to that of the local user executing the run command -**Additional tips and troubleshooting commands:** +## Additional tips and troubleshooting commands - Use absolute paths when using the `-v` flag: @@ -196,7 +198,8 @@ If on top of changing the UID and GID you also **need to create a new user**, yo -v $(PWD)/:/home/jovyan/work ``` - In this example, we use the syntax `$(PWD)`, which is replaced with the full path to the current directory. The destination path should also be an absolute path starting with a `/` such as `home/jovyan/work`. + In this example, we use the syntax `$(PWD)`, which is replaced with the full path to the current directory. The destination + path should also be an absolute path starting with a `/` such as `home/jovyan/work`. - You might want to consider using the Docker native `--user ` and `--group-add users` flags instead of `-e NB_GID` and `-e NB_UID`: @@ -215,7 +218,8 @@ If on top of changing the UID and GID you also **need to create a new user**, yo - Use `docker inspect ` and look for the [`Mounts` section](https://docs.docker.com/storage/volumes/#start-a-container-with-a-volume) to verify that the volume was created and mounted accordingly: ```json - # for example, for a my-vol volume created with docker volume create + # for example, for a my-vol volume created with + # docker volume create --name "Mounts": [ {