13 lines
284 B
Docker
Executable File
13 lines
284 B
Docker
Executable File
FROM node:14.18.3 as builder
|
|
|
|
WORKDIR /opt
|
|
COPY .. .
|
|
|
|
RUN npm install -g cnpm --registry=https://registry.npm.taobao.org \
|
|
&& cnpm install && cnpm run build
|
|
|
|
FROM nginx:1.19
|
|
|
|
COPY --from=builder /opt/web.conf /etc/nginx/conf.d/default.conf
|
|
COPY --from=builder /opt/dist /opt/dist
|