Open OlafEichstaedt opened 4 years ago
After endless trials and trying a different image (continuumio/anaconda3
) I stumbled upon a way to reproduce and overcome the problem.
Mapping internal port 8888 to external port 8888 does not work ... I get the authentification/login page all the time.
Mapping internal 8888 to some other port => works like charm. That means
version: '2.3'
services:
python:
build:
context: .
dockerfile: Dockerfile
image: python_image
volumes:
- ./notebooks:/home/jovyan/notebooks
ports:
- "8888:8888"
does not let me past the login/authorization page.
version: '2.3'
services:
python:
build:
context: .
dockerfile: Dockerfile
image: python_image
volumes:
- ./notebooks:/home/jovyan/notebooks
ports:
- "9999:8888"
does.
The container's log will say:
python_1 | [I 19:49:09.356 LabApp] The Jupyter Notebook is running at:
python_1 | [I 19:49:09.356 LabApp] http://127.0.0.1:8888/?token=[...]
and I will ask the browser to access:
http://127.0.0.1:9999/?token=[...]
and Jupyter Lab will start as expected.
I am trying to run Jupyter Lab in a Docker container on a Windows machine.
But Jupyter does not accept the token or does not allow me to register a password.
Dockerfile:
docker-compose.yml
after
docker-compose up -d
the container starts and the logfile shows:When I use
http://127.0.0.1:8888/?token=8b99fa26fb7e7278796c83327095b92477b3c606025f58e7
in the browser of the host computer, I get redirected tohttp://127.0.0.1:8888/login?next=%2Ftree%3Ftoken%3D8b99fa26fb7e7278796c83327095b92477b3c606025f58e7
, and the page "Token authentication is required".(1) entering the token (even though it was present in the URL) has no effect (fails with
Invalid credentials
) (2) entering token and a new password to "Setup a Password" does not work (nothing seems to happen)Any thoughts what may be wrong?