V
V
Vlad2021-10-01 16:38:30
Docker
Vlad, 2021-10-01 16:38:30

How to install something under Docker root in Jupiter NoteBook image?

Hello! I'm running a docker container with the command:

sudo docker run -d  -e GRANT_SUDO=yes  -p  8888:8888 jupyter/base-notebook


But then when I'm in the console of the jupiter notebook itself, where I get to with the command
sudo docker exec -it <имя_контейнера>

I can't install anything. For example, if I write, jupyter nbextension install --py jupyter_tabnine
I get an error
PermissionError: [Errno 13] Permission denied: '/usr/local/share/jupyter'
. And if I write the same command through sudo, then I am asked for a password from the user jovyan , and I have no idea what the password is.

Tell me, please, how to fix this?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Karabanov, 2021-10-01
@Vlad1987

GRANT_SUDO=yessays that inside the container you can use sudo.
You can enter the container as a privileged user like this:
docker exec -u root -it <имя_контейнера> bash
But this is a security hole.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question