title: Can’t acces Docker container on localhost
body: <p>I have a front app who uses Angular-cli and i’am trying to check if it works proprely separetly before integrating it in the container core but it seems that i can’t get acces to the localhost.
  I’am using a macOS Catalina 10.15.7 with Docker Desktop.</p>
  <p>And it's not the same problem as others because i already tested before asking my question in stackoverflow so don't put as duplicate, THANK YOU !!</p>
  <p>My Dockerfile is build like this:</p>
  <pre><code>FROM    node:14-alpine3.12
  
  WORKDIR /app/front
  
  #COPY    ./angular-cli .
  COPY    package.json package-lock.json
  COPY    . .       
  
  RUN     npm install 
  RUN     npm install -g @angular/cli
  
  EXPOSE  4200
  # Angular installation if it fails, 
  
  CMD     [&quot;ng&quot;, &quot;serve&quot;]
  </code></pre>
  <p>And when i run the app with the command:</p>
  <pre><code>docker run -d -p 80:4200 reponame
  </code></pre>
  <p>My build works perfectly and shows me this:</p>
  <pre><code>** Angular Live Development Server is listening on localhost:4200, open your browser on http://localhost:4200/ **
  Compiled successfully.
  </code></pre>
  <p>and when i go to Localhost:4200 it shows that the page is not accessible.
  i also tried to connect with Ip adress using this commands but same thing.</p>
  <pre><code>docker inspect -f ‘{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}’ imagename
  </code></pre>
  <p>i also tried to change different ports because i read in Mac the port 80 might be broken or smth so i tried:</p>
  <pre><code>docker run -d -p 4200:4200 appname
  docker run -d -p 8080:4200 appname
  </code></pre>
  <p>If anyone can help me, would really greatfull.
  Thanks !</p>