-
Notifications
You must be signed in to change notification settings - Fork 1.3k
/
Dockerfile
38 lines (29 loc) · 994 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# BUILDING
FROM node:lts-alpine AS builder
# base on work of llitfkitfk@gmail.com
LABEL maintainer="chibing.fy@alibaba-inc.com"
WORKDIR /app
# cache dependencies
COPY package.json ./
# 在国内打开下面一行加速
#RUN npm config set registry https://registry.npm.taobao.org/
# instal dependencies
RUN npm install typescript -g && \
npm install
# build
COPY . ./
RUN npm run build
# RUNNING
FROM node:lts-alpine
# base on work of llitfkitfk@gmail.com
LABEL maintainer="chibing.fy@alibaba-inc.com"
# use China mirror of: https://github.com/jgm/pandoc/releases/download/2.7.3/pandoc-2.7.3-linux.tar.gz
RUN wget http://rap2-taobao-org.oss-cn-beijing.aliyuncs.com/pandoc-2.7.3-linux.tar.gz && \
tar -xf pandoc-2.7.3-linux.tar.gz && \
cp pandoc-2.7.3/bin/* /usr/bin/ && \
pandoc -v && \
rm -rf pandoc-2.7.3-linux.tar.gz pandoc-2.7.3
WORKDIR /app
COPY --from=builder /app/public .
COPY --from=builder /app/dist .
COPY --from=builder /app/node_modules ./node_modules