FROM node:10 AS ui-build WORKDIR /usr/src/ COPY app/ ./app/ RUN cd app && yarn install && yarn run build FROM node:10 AS server-build WORKDIR /root/ COPY --from=ui-build /usr/src/app/dist ./app/dist # Take advantage of cached Docker layers COPY server/package.json ./server/ COPY server/yarn.lock ./server/ RUN cd server && yarn install COPY server/ ./server/ EXPOSE 3080 CMD ["node", "./server/server.js"]