Angular App Image with non root user
I am creating docker image of my angular app using root user.But i want to change it to use non root user.Please help me doing this. Here is my docker file. `FROM docker.com/node:latest as node
WORKDIR /app
COPY . .
RUN npm install
RUN npm run ng build -- --prod
#stage 2 : to run application
FROM docker.com/nginx:alpine
COPY --from=node /app/dist/MyApp /usr/share/nginx/html`
add a USER verb at an appropriate place in the docker file
USER <user>[:<group>]
appropriate means: once you add that, henceforth the rest of the actions will be carried out under that user.
reference: https://docs.docker.com/engine/reference/builder/
answered, closing. feel free to re-open if it is outstanding