Dockerfile 319 B

12345678910111213141516
  1. # ---- Dependencies ----
  2. FROM node:16-alpine AS dependencies
  3. WORKDIR /app
  4. COPY package.json ./
  5. RUN yarn install
  6. # ---- Build ----
  7. FROM dependencies AS build
  8. WORKDIR /app
  9. COPY . /app
  10. RUN yarn build
  11. FROM nginx:1.23-alpine
  12. COPY --from=build /app/dist /usr/share/nginx/html
  13. EXPOSE 80
  14. CMD [ "nginx", "-g", "daemon off;" ]