I am trying to follow this documentation on deploying my angular 4 web app with docker.
Azure Web App on Linux Documentation
Below is what my Docker File currently looks like:
# Create image based on the official Node 6 image from dockerhub
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 directory
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 80
# Serve the app
CMD ["npm", "start"]
My package.json currenly has this under scripts
"start": "ng serve -H 0.0.0.0",
I am able to create the Web App on Linux and push my image but i am getting the following when trying to browse the web application:
Invalid Host header
Am I missing something in my docker file? I am kinda stuck at this point so any help would be appreciated.
ng serve? This is in theory only static content, right?