Dockerfile 678 B

123456789101112131415161718192021222324252627
  1. FROM node:16.15.1-alpine AS builder
  2. # Install dependencies for building native libraries
  3. RUN apk add --update git openssh-client python3 alpine-sdk
  4. WORKDIR /workspace
  5. # docker-build plugin copies everything needed for `yarn install` to `manifests` folder.
  6. COPY manifests ./
  7. RUN yarn install --immutable
  8. FROM node:16.15.1-alpine
  9. RUN apk add --update curl
  10. WORKDIR /workspace
  11. # Copy the installed dependencies from the previous stage.
  12. COPY --from=builder /workspace ./
  13. # docker-build plugin runs `yarn pack` in all workspace dependencies and copies them to `packs` folder.
  14. COPY packs ./
  15. ENTRYPOINT [ "/workspace/packages/auth/docker/entrypoint.sh" ]
  16. CMD [ "start-web" ]