Been driving myself nuts trying to figure this out.
I have a very simple Angular project with routing, below is the app.module.ts, nginx.conf and docker file.
Silly me, I was not overwriting the default docker conf in the docker file
COPY nginx.conf /etc/nginx/conf.d/default.conf