title: How to manage nginx docker image?
body: <p>I'm having another separate issue, but I found a solution for it in the <a href="https://stackoverflow.com/questions/46959917/vuejs-2-router-is-not-working-when-it-is-in-production-build">following post</a>. As suggested there, I will need to modify my <code>nginx server</code> by adding the section</p>
  
  <pre><code>http {
     ## ...
     ## other configuration
  
     server {
          listen 80;
  
          server_name yourservername.com;
          root html/path_to_your_project;
  
          index index.php index.html;
  
          location / {
              try_files $uri $uri/ /index.html;
          }
      }
  }
  </code></pre>
  
  <p>at the file: <code>etc/nginx/sites-enabled/default.cnf</code>, where it seems that there is already the tag <code>server {</code> and I just need to add the section from above inside of it.</p>
  
  <p>But, since I'm working with docker image and not the real server itself, I'm not sure how to accomplish this. This is my <code>.Dockerfile</code> and I'm not sure what changes I will need to do inside of it.</p>
  
  <pre><code># build stage
  FROM node:9.11.1-alpine as build-stage
  WORKDIR /app
  COPY package*.json ./
  RUN npm i npm@latest -g &amp;&amp; \
      npm install
  COPY . .
  RUN node build/build.js
  
  # production stage
  FROM nginx:1.13.12-alpine as production-stage
  COPY --from=build-stage /app/dist /usr/share/nginx/html
  EXPOSE 80
  CMD ["nginx", "-g", "daemon off;"]
  </code></pre>