anaconda/docker-images

Running as root is not recommended. Use --allow-root to bypass.

Opened this issue ยท 9 comments

boldt commented

If I start the Jupyter Notebook as described in the readme (docker container continuumio/anaconda3 latest c357d1cc27c8)...

docker run -i -t -p 8888:8888 continuumio/anaconda3 /bin/bash -c "/opt/conda/bin/conda install jupyter -y --quiet && mkdir /opt/notebooks && /opt/conda/bin/jupyter notebook --notebook-dir=/opt/notebooks --ip='*' --port=8888 --no-browser"

I get the following error and the container closesv:

Running as root is not recommended. Use --allow-root to bypass.

Thus, I added --allow-root to the default command:

docker run -i -t -p 8888:8888 continuumio/anaconda3 /bin/bash -c "/opt/conda/bin/conda install jupyter -y --quiet && mkdir /opt/notebooks && /opt/conda/bin/jupyter notebook --notebook-dir=/opt/notebooks --ip='*' --port=8888 --no-browser --allow-root"

EDIT:

@boldt I got mine running the same way.
But how do you restart the same container. I tried with

docker start <CONTAINER_ID> && docker exec -d -t <CONTAINER_ID> /bin/bash -c "/opt/conda/bin/jupyter notebook --notebook-dir=/opt/notebooks --ip='*' --port=8888 --no-browser --allow-root"

But the container just dies after some time

Im using Kali Linux, while I type Jupyter Notebook it showing
[C 12:42:22.238 NotebookApp] Running as root is not recommended. Use --allow-root to bypass.

How can I solve it.

Im using Kali Linux, while I type Jupyter Notebook it showing
[C 12:42:22.238 NotebookApp] Running as root is not recommended. Use --allow-root to bypass.

How can I solve it.
@Shoib007
Try this out
jupyter notebook --ip='*' --port=8888 --allow-root
Although it's not a recommended solution

RUN THIS CODE jupyter notebook --allow-root

When i try to open jupyter by terminal i get this "Running as root is not recommended. Use --allow-root to bypass"
so i came here and read all the useful comments but didn't work exactly same.
SOL -
(A) First of all set a password for the root

1- sudo passwd root

2- (there are two password one for your computer user and the second one for enabling "root")
use here computer user password.

3- Enter new UNIX password (now here use a different password for your root login)
Retype new UNIX password and then ENTER!!
Password update successfully !

(B)
1- su - ENTER !!

2- ENTER YOUR NEW UNIX - THEN ENTER!!

3- Then write this code-> docker run -i -t -p 8888:8888 continuumio/anaconda3 /bin/bash -c "/opt/conda/bin/conda install jupyter -y --quiet && mkdir /opt/notebooks && /opt/conda/bin/jupyter notebook --notebook-dir=/opt/notebooks --ip='*' --port=8888 --no-browser --allow-root"

4- ENTER!!

After loading the whole page (can take few minutes) scroll down and see near at the bottom of the page you will get the link copy it and run it in any browser. Now you can open a NEW NOTEBOOK without any pro.

Gracias

#94 (comment)
This will 100% solve your problem

jupyter notebook --ip='*' --port=8888 --allow-root

I know I should start jupyter notebook with "--allow-root", but I am using ssh to connect to the server in vscode. Is there any way to solve the problem in this kind of environment?