I'm trying to containerize my Angular app using Docker.
I'm pretty new to Docker, hence I followed a tutorial, adding a Dockerfile with the following content:
FROM node:13.3.0 AS compile-image
WORKDIR /usr/src/app
COPY package.json package-lock.json ./
RUN npm install
ENV PATH="./node_modules/.bin:$PATH"
COPY . ./
RUN ng build --prod
FROM nginx
COPY nginx.conf /etc/nginx/nginx.conf
COPY --from=compile-image /opt/ng/dist/myproject /usr/share/nginx/html
But somehow it fails at Step 9/10 returning following error:
COPY failed: stat /var/lib/docker/tmp/docker-builder934487773/nginx.conf: no such file or directory
stat /var/lib/docker/overlay2/9240a4bec850e1e39aabeb7b6d37c1cdfdb078743bd77fe426484267aad37a03/merged/opt/ng/dist/myproject: no such file or directory