title: Angular 2 app deploy in a docker Container running on AWS
body: <p>Hello Fellow Programmer,</p>
  
  <p>For a project we created an Angular 2, which will be our GUI.
  This GUI will get his Data from a Backend-API hosted at Amazon Web Services (AWS)‎.</p>
  
  <p>The GUI should run also on AWS, we thougt about running it as an Docker container on an EC2.</p>
  
  <p>The GUI works fine on my PC but im not able to make a prober Docker container, which work neither on my pc or on AWS.</p>
  
  <p>Do you guys know a good Tutorial / Hello World Project where i can learn how to create an Angular 2 app in Docker?</p>
  
  <p><em>Some more information how im trying to do this:</em></p>
  
  <p>my Dockerfile</p>
  
  <pre><code> # Create image based off of the official Node 6 image
   FROM node:6
  
   # Create a directory where our app will be placed
   RUN mkdir -p /usr/src/app
  
   # Change directory so that our commands run inside this new dir
   WORKDIR /usr/src/app
  
   # Copy dependency definitions
   COPY package.json /usr/src/app
  
   # Install dependecies
   RUN npm install
  
   # Get all the code needed to run the app
   COPY . /usr/src/app
  
   # Expose the port the app runs in
   EXPOSE 4200
  
   # Serve the app
   CMD ["npm", "start"]
  </code></pre>
  
  <p>change the <code>package.json</code></p>
  
  <pre><code>  {
      ...
      "scripts": {
         "start": "ng serve -H 0.0.0.0",
         ...
       },
      ...
    }
  </code></pre>
  
  <p>run <code>docker build -t gui:test .</code></p>
  
  <p>run <code>docker run --name gui -p 4200:4200 gui:test</code></p>
  
  <p>if i did it correctly <code>localhost:4200</code> should show me my running Angluar 2 app, which he does not. </p>
  
  <p><strong>Edit:</strong>
  The ip given from the demon with the Port doesnt work aswell <code>192.168.99.100:4200</code></p>