Merge branch 'test'
commit
1f62e1f767
@ -0,0 +1,19 @@
|
|||||||
|
# See https://help.github.com/ignore-files/ for more about ignoring files.
|
||||||
|
|
||||||
|
# dependencies
|
||||||
|
/node_modules
|
||||||
|
|
||||||
|
# testing
|
||||||
|
/coverage
|
||||||
|
|
||||||
|
# misc
|
||||||
|
.DS_Store
|
||||||
|
.env
|
||||||
|
npm-debug.log*
|
||||||
|
yarn-debug.log*
|
||||||
|
yarn-error.log*
|
||||||
|
|
||||||
|
# css
|
||||||
|
src/**/*.css
|
||||||
|
build
|
||||||
|
build.zip
|
@ -1,5 +1,37 @@
|
|||||||
FROM node:8.11.1-alpine
|
# 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://q08gwzg9o.bkt.clouddn.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
|
WORKDIR /app
|
||||||
ADD . /tmp
|
COPY --from=builder /app/dist .
|
||||||
RUN /bin/sh -c 'cd /tmp && npm install && npm install -g typescript && npm run build && mv ./dist/* /app/ && mv ./node_modules /app/ && rm -rf /tmp'
|
COPY --from=builder /app/node_modules ./node_modules
|
Loading…
Reference in New Issue