title: Django shell_plus: How to access Jupyter notebook in Docker Container
body: <p>I am trying to access a Jupyter Notebook created with the <code>shell_plus</code> command from django-extensions in a Docker container.</p>
  
  <pre><code>docker-compose -f local.yml run --rm django python manage.py shell_plus --notebook
  </code></pre>
  
  <p>My configuration is based on the answers of @RobM and @Mark Chackerian to this <a href="https://stackoverflow.com/questions/35483328/how-do-i-set-up-jupyter-ipython-notebook-for-django">Stack Overflow question</a>. I.e. I installed and configured a custom kernel and my Django apps config file has the constant <code>NOTEBOOK_ARGUMENTS</code> set to:</p>
  
  <pre><code>NOTEBOOK_ARGUMENTS = [
      '--ip', '0.0.0.0',
      '--port', '8888',
      '--allow-root',
      '--no-browser',
  ]
  </code></pre>
  
  <p>I can see the container starting successfully in the logs:</p>
  
  <pre><code>[I 12:58:54.877 NotebookApp] The Jupyter Notebook is running at:
  [I 12:58:54.877 NotebookApp] http://10d56bab37fc:8888/?token=b2678617ff4dcac7245d236b6302e57ba83a71cb6ea558c6
  [I 12:58:54.877 NotebookApp]  or http://127.0.0.1:8888/?token=b2678617ff4dcac7245d236b6302e57ba83a71cb6ea558c6
  </code></pre>
  
  <p>But I can't open the url. I have forwarded the port 8888 in my <code>docker-compose</code>, tried to use <code>localhost</code> instead of <code>127.0.0.1</code> and also tried to use the containers IP w/o success.</p>
  
  <p>It feels like I am missing the obvious here … Any help is appreciated.</p>