FROM node:16-alpine as build-step
RUN mkdir /app/
RUN mkdir /app/node_modules
RUN chown -R node:node /app/node_modules
#RUN mkdir /app/node_module/.bin
WORKDIR /app/
ENV PATH /app/node_modules/.bin:$PATH
COPY package.json ./
COPY package-lock.json ./
RUN npm install
COPY . ./
# USER node
RUN npm run build

FROM nginx:1-alpine
RUN mkdir /nooo/
RUN mkdir /nooo/build/
COPY --from=build-step /app/build /nooo/build/