2019-07-26 23:59:22 +08:00
|
|
|
# Builder
|
2021-11-16 04:35:23 +08:00
|
|
|
FROM node:lts as builder
|
2019-07-26 23:59:22 +08:00
|
|
|
|
|
|
|
WORKDIR /src
|
|
|
|
|
|
|
|
COPY . /src
|
|
|
|
RUN yarn --network-timeout=100000 install
|
|
|
|
RUN yarn build
|
|
|
|
|
|
|
|
|
|
|
|
# App
|
|
|
|
FROM nginx:alpine
|
|
|
|
|
|
|
|
COPY --from=builder /src/build /app
|
|
|
|
|
|
|
|
RUN rm -rf /usr/share/nginx/html \
|
|
|
|
&& ln -s /app /usr/share/nginx/html
|