title: Can't access jupyter notebook inside docker container
body: <p>I know there are a lot of questions of people who are struggling with this but please read the entire post.<br>
  So I just want to create a dockerfile that exposes port 8888 to access a jupyter notebook later on.</p>
  
  <p>This is my dockerfile:</p>
  
  <pre><code>FROM continuumio/anaconda3
  ENV DEBIAN_FRONTEND=noninteractive
  
  ARG USERNAME=remote
  ARG USER_UID=1000
  ARG USER_GID=$USER_UID
  
  COPY environment.yml* noop.txt /tmp/conda-tmp/
  
  RUN apt-get update \
      &amp;&amp; apt-get -y install --no-install-recommends apt-utils dialog 2&gt;&amp;1 \
      &amp;&amp; apt-get -y install git openssh-client less iproute2 procps iproute2 lsb-release \
      &amp;&amp; if [ -f "/tmp/conda-tmp/environment.yml" ]; then /opt/conda/bin/conda env update -n base -f /tmp/conda-tmp/environment.yml; else echo "did not find environment.yml"; fi \
      &amp;&amp; rm -rf /tmp/conda-tmp \
      &amp;&amp; groupadd --gid $USER_GID $USERNAME \
      &amp;&amp; useradd -s /bin/bash --uid $USER_UID --gid $USER_GID -m $USERNAME \
      &amp;&amp; apt-get install -y sudo \
      &amp;&amp; echo $USERNAME ALL=\(root\) NOPASSWD:ALL &gt; /etc/sudoers.d/$USERNAME\
      &amp;&amp; chmod 0440 /etc/sudoers.d/$USERNAME \
      &amp;&amp; apt-get autoremove -y \
      &amp;&amp; apt-get clean -y \
      &amp;&amp; rm -rf /var/lib/apt/lists/*
  
  ENV DEBIAN_FRONTEND=dialog
  
  EXPOSE 8888
  </code></pre>
  
  <p>I run the following commands to get the container up and running:<br></p>
  
  <pre><code>docker build -t intel . (create the image)
  docker run -t -d --publish=8888:8888 --name ig intel (start a container based on the image)
  </code></pre>
  
  <p>Everything up to this moment runs without any problems, but now comes the thing I don't understand:<br>
  This runs just fine.
  <a href="https://i.stack.imgur.com/Udqyt.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Udqyt.png" alt="jupyter notebook --allow-root --no-browser --ip 0.0.0.0 --port 8888"></a></p>
  
  <p>But when I try to go to</p>
  
  <pre><code>localhost:8888?/token=(the token jupyter provides)
  or
  ipofthecontainer:8888?/token=(the token jupyter provides)
  </code></pre>
  
  <p>It does nothing(connection timed out) and I have no clue why.</p>
  
  <p>I check the ip of the container with:</p>
  
  <pre><code>docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' container_name
  </code></pre>
  
  <p>and I verify that the EXPOSE worked with:</p>
  
  <p><a href="https://i.stack.imgur.com/MhaLW.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/MhaLW.png" alt="docker ps"></a></p>
  
  <p>platform: windows<br>
  python-version: 3.7.7<br>
  conda environment: yes<br></p>
  
  <p>What am I not seeing here?</p>