title: Cannot access Vue CLI inside docker container
body: <p>Based on this guide:</p>
  
  <p><a href="https://shekhargulati.com/2019/01/18/dockerizing-a-vue-js-application/" rel="nofollow noreferrer">https://shekhargulati.com/2019/01/18/dockerizing-a-vue-js-application/</a></p>
  
  <p>I have created a sample VueJS app and created a docker image:</p>
  
  <pre><code>docker build -t myapp .
  </code></pre>
  
  <p>based on the below Dockerfile:</p>
  
  <pre><code># base image
  FROM node:10.15.0
  
  # set working directory
  RUN mkdir /usr/src/app
  WORKDIR /usr/src/app
  
  # add `/usr/src/app/node_modules/.bin` to $PATH
  ENV PATH /usr/src/app/node_modules/.bin:$PATH
  
  # install and cache app dependencies
  COPY package.json /usr/src/app/package.json
  RUN npm install
  RUN npm install -g @vue/cli
  # start app
  CMD ["npm", "run", "serve"]
  </code></pre>
  
  <p>Next I run a docker container with:</p>
  
  <pre><code>docker run -it -v ${PWD}:/usr/src/app -v /usr/src/app/node_modules -p 5000:5000 myapp
  </code></pre>
  
  <p>and get this (successfull) output:</p>
  
  <pre><code>DONE  Compiled successfully in 4644ms                                                                                 4:05:10 PM
  
  No type errors found
  No lint errors found
  Version: typescript 3.4.3, tslint 5.15.0
  Time: 4235ms
  
    App running at:
    - Local:   http://localhost:8080/ 
  
    It seems you are running Vue CLI inside a container.
    Access the dev server via http://localhost:&lt;your container's external mapped port&gt;/
  
    Note that the development build is not optimized.
    To create a production build, run npm run build.
  </code></pre>
  
  <p>I then try to access the application from my browser on: <a href="http://localhost:5000/" rel="nofollow noreferrer">http://localhost:5000/</a> but I just get a <strong>The connection was reset</strong> error.</p>
  
  <p>I have also tried to inspect the port information on the running container with:</p>
  
  <pre><code>$ docker ps
  CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS                    NAMES
  755d2745bce2        myapp               "npm run serve"     22 seconds ago      Up 18 seconds       0.0.0.0:5000-&gt;5000/tcp   confident_mirzakhani
  $ docker port confident_mirzakhani
  5000/tcp -&gt; 0.0.0.0:5000
  </code></pre>
  
  <p>But that basically confirms the port info I passed to the run command.</p>
  
  <p>Any suggestion on how to access the VueJS application in the container from the browser on my host?</p>