I am looking for a solution for correct docker file but when I write localhost:8080 on browser I can see nginx but I can not see default angular website on the browser. What can I do with my Docker file. What it is wrong ?
FROM node:12.8-alpine AS builder
WORKDIR /app
RUN npm install
COPY . .
RUN npm run build
# Step 2: Use build output from 'builder'
FROM nginx:stable-alpine
LABEL version="1.0"
COPY nginx.conf /etc/nginx/nginx.conf
WORKDIR /usr/share/nginx/html
COPY --from=builder . /app
CMD ["nginx", "-g", "daemon off;"]

localhost:8080from a browser running on your machine, you will need to publish that port, which is something that happens at runtime. That's not something that gets baked into your Dockerfile.COPYline is copying to/appin the Nginx image, not theWORKDIRyou set in the line previous. Did you mean to have the arguments in the opposite order,COPY --from=builder /app .?