Dockerfile.production 571 B

123456789101112131415161718
  1. FROM node:16 as nodebuild
  2. WORKDIR /app
  3. COPY dashboard .
  4. RUN npm i --legacy-peer-deps
  5. RUN npm run build
  6. # All build artifacts are built in github actions, and copied in
  7. # Ubuntu is used to match Github action, and use github action caching instead of docker caching
  8. FROM ubuntu as runner
  9. RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates tzdata
  10. WORKDIR /porter
  11. COPY bin/app /porter/
  12. COPY bin/migrate /porter/
  13. # COPY build/ /porter/static
  14. COPY --from=nodebuild /app/dashboard/build/ /porter/static
  15. RUN chmod +x /porter/app /porter/migrate