FROM node:{{ node.version }} AS base WORKDIR {{ project_root }} RUN mkdir /node_modules \ && chown node:node -R {{ project_root }} /node_modules COPY --chown=node:node package*.json *yarn* {{ project_root }} USER node ################################################################################ FROM base AS build RUN yarn install --frozen-lockfile COPY --chown=node:node . . CMD ["bash"]