I have angular 6 application. It builds and works with no issue locally.
Now I want to create docker image. I'm following this guide https://medium.com/@tiangolo/angular-in-docker-with-nginx-supporting-environments-built-with-multi-stage-docker-builds-bb9f1724e984
The issue is that application can't find some modules when dockerizing it (fails on 7 step). When I run command from this step in console, it builds normally. How can I approach this? I'm fighting this 2 days now.
Dockerfile:
# Stage 0, "build-stage", based on Node.js, to build and compile the frontend
FROM tiangolo/node-frontend:10 as build-stage
WORKDIR /app
COPY package*.json /app/
RUN npm install
COPY ./ /app/
ARG configuration=production
RUN npm run build -- --output-path=./dist/out --configuration $configuration
# Stage 1, based on Nginx, to have only the compiled app, ready for production with Nginx
FROM nginx:1.15
COPY --from=build-stage /app/dist/out/ /usr/share/nginx/html
# Copy the default nginx.conf provided by tiangolo/node-frontend
COPY --from=build-stage /nginx.conf /etc/nginx/conf.d/default.conf

Dockerfilein to your question. Screenshots do not help in this casedocker build . -t test-appand thendocker run -it test-app bashyou'll get a terminal in your docker container. Check if all files are there and correct