title: How to fix "curl (56) Recv failure: Connection reset by peer" error when doing a port mapping from docker container to host machine?
body: <p>I have a Angular Project running in a docker container at port 4200. I have done a port mapping from docker container's 4200 port to my localhost 4200.</p>
  
  <p>I am running this on Ubuntu 16.04. When doing <code>netstat -nltp</code>, I get output</p>
  
  <p><code>tcp6       0      0 :::4200                 :::*                    LISTEN</code></p>
  
  <p>My Dockerfile looks like : </p>
  
  <pre><code>FROM node
  RUN mkdir -p /usr/src/app
  WORKDIR /usr/src/app
  COPY package.json /usr/src/app
  RUN npm cache clean --force
  RUN npm install
  COPY . /usr/src/app
  EXPOSE 4200
  CMD ["npm","start"]
  </code></pre>
  
  <p>I expected when running curl :::4200, to show me the webpage sourcecode instead of the error,
  <code>curl (56) Recv failure: Connection reset by peer</code></p>