mirror of
https://github.com/cool-team-official/cool-admin-vue.git
synced 2024-11-01 06:02:38 +08:00
16 lines
444 B
Docker
16 lines
444 B
Docker
|
FROM node:lts-alpine
|
||
|
WORKDIR /build
|
||
|
# 设置Node-Sass的镜像地址
|
||
|
RUN npm config set sass_binary_site https://repo.huaweicloud.com/node-sass
|
||
|
# 设置npm镜像
|
||
|
RUN npm config set registry https://repo.huaweicloud.com/repository/npm/
|
||
|
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
|