You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
322 B
14 lines
322 B
FROM node:lts-alpine
|
|
WORKDIR /build
|
|
# 设置npm镜像
|
|
RUN npm config set registry https://registry.npmmirror.com
|
|
COPY package.json /build/package.json
|
|
RUN npm install
|
|
COPY ./ /build
|
|
RUN npm run build
|
|
|
|
FROM nginx
|
|
RUN mkdir /app
|
|
COPY --from=0 /build/dist /app
|
|
COPY --from=0 /build/nginx.conf /etc/nginx/nginx.conf
|
|
EXPOSE 80
|
|
|