KevinKim
KevinKim

Reputation: 1434

Installed Docker and Try to create new files with permission deny message

I installed docker on my computer and also installed Jupyter on it. However, when I try to create new program or folder on the browser, it generates a "permission deny" message.

enter image description here

I also try to start the terminal on this browser and create a folder using terminal, it generates the same permission deny message.

enter image description here

I couldn't figure out what happens to it.

Upvotes: 1

Views: 1825

Answers (1)

Sida Zhou
Sida Zhou

Reputation: 3705

It's something to do with the permission docker uses and the permission that's granted by the OS.

After some fiddling I found that if uid and gid matches between the OS and the container, then there's no problem. Use id in shell to get your current ids, and then set following flags: -e NB_UID=[uid] -e NB_GID=[gid]

The full command might look something like:

docker run -d -p 8888:8888 --user root -e GRANT_SUDO=yes -e NB_UID=1011 -e NB_GID=1011 -v $(pwd):/home/jovyan/work jupyter/scipy-notebook:latest

Upvotes: 2

Related Questions