builder.Dockerfile 588 B

1234567891011121314151617181920
  1. FROM node:14-alpine AS builder
  2. RUN apk update && apk add make
  3. RUN mkdir /app
  4. RUN addgroup -S appgroup && adduser -S appuser -G appgroup && chown appuser:appgroup /app
  5. USER appuser
  6. WORKDIR /app
  7. COPY --chown=appuser:appgroup package.json yarn.lock ./
  8. RUN yarn
  9. COPY --chown=appuser:appgroup src ./src
  10. COPY --chown=appuser:appgroup public ./public
  11. COPY --chown=appuser:appgroup README.md .env.test .prettierrc.js .eslintrc.js tsconfig.json ./
  12. ARG REACT_APP_API_URL=http://localhost:3002
  13. ENV REACT_APP_API_URL=${REACT_APP_API_URL}
  14. RUN yarn build
  15. COPY --chown=appuser:appgroup Makefile ./