0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2024-12-16 20:26:19 -05:00

chore: optimize Dockerfile (#2334)

This commit is contained in:
Gao Sun 2022-11-07 19:28:34 +08:00 committed by GitHub
parent 877eb892c9
commit d42a19133d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2,13 +2,14 @@
FROM node:16-alpine as builder
WORKDIR /etc/logto
ENV CI=true
COPY . .
# Install toolchain
RUN npm add --location=global pnpm@^7.2.1
RUN npm add --location=global pnpm@^7.14.0
# https://github.com/nodejs/docker-node/blob/main/docs/BestPractices.md#node-gyp-alpine
RUN apk add --no-cache python3 make g++
COPY . .
# Install dependencies and build
RUN pnpm i
RUN pnpm -r build