15 lines
373 B
Docker
15 lines
373 B
Docker
FROM node:latest as builder
|
|
WORKDIR /usr/src/app
|
|
COPY package*.json ./
|
|
RUN npm install
|
|
COPY . .
|
|
RUN npm run build
|
|
|
|
FROM node:14
|
|
RUN apt-get update && apt-get install -y ghostscript
|
|
WORKDIR /usr/src/app
|
|
COPY --from=builder /usr/src/app/package*.json ./
|
|
COPY --from=builder /usr/src/app/build ./dist
|
|
RUN npm install --only=production
|
|
EXPOSE 3000
|
|
CMD ["node", "dist/index.js"] |