Jupyter Notebook cells not showing in code-server running in a docker

Question:

I want to use Jupyter notebooks in Code-Server in a docker. For whatever reasons I cant get it running and I also have/found no error messages that could help me finding the cause.

Jupyter notebook files (ipynb) can be created and I can also select a valid kernel (usual python environment with ipykernel). Everything looks familiar until this point. However, I cannot create any cells. Just nothing happens when I click the + Code button. If I click RUN, I also get no error messages and it seems to execute "empty cells".

My assumption is that something is wrong with the connection between code-server and the ipykernel that is launched inside the docker by the code-server app but without any error message it is still guessing. After searching exhaustively on the Internet, I could only find one other post where the problem looks similar. Since my setup is different Im not sure if it is about the same cause: Stackoverflow Post

Hopefully someone of you have an idea of what my mistake is.

Many thanks in advance!!

MY DOCKERFILE

FROM python:3.9.13

# install some basic stuff
RUN apt-get update && apt-get install -y 
    openssl 
    net-tools 
    git 
    locales 
    dumb-init 
    vim 
    curl 
    wget 
    python3-pip 
    && rm -rf /var/lib/apt/lists/*
    
# install kernel
RUN pip install ipykernel

# install the latest code-server version
RUN curl -fsSL https://code-server.dev/install.sh | sh


RUN groupadd -g 999 coder && 
    useradd -r -u 999 -g coder coder && 
    mkdir /home/coder && 
    chown coder:coder /home/coder

USER 999:999
EXPOSE 3000
ENV HOME /home/coder
ENV GIT_DISCOVERY_ACROSS_FILESYSTEM 1

# install VS Code extensions for the user
RUN code-server --install-extension ms-python.python

ENTRYPOINT ["dumb-init", "--"]
CMD ["bash", "-c", "exec code-server --host 0.0.0.0 --port 3000 --auth none /home/coder"]

SCREENSHOT
Code-Server with Jupyter Notebook

  • tried different base docker images
  • installed/ran successfully Jupyter notebook but the issue in code-server stays
  • reloading of code-server and disabling/enabling its extensions
Asked By: David

||

Answers:

As MingJie-MSFT explained, this problem is already known and is caused by the lack of https://. See this issue and this issue on GitHub.

Fortunately, I can provide https:// in the environment where the Docker is deployed. The problem only occurred on my local computer so far.

So the solution is to provide valid https:// or use one of the modified images mentioned here.

Answered By: David