mirror of
https://gitee.com/huangge1199_admin/vue-pro.git
synced 2024-11-26 17:21:53 +08:00
23 lines
364 B
Docker
23 lines
364 B
Docker
|
FROM node:16-alpine as DIST
|
||
|
|
||
|
WORKDIR /admim
|
||
|
|
||
|
COPY ./package.json .
|
||
|
COPY ./yarn.lock .
|
||
|
COPY ./.npmrc .
|
||
|
RUN yarn install
|
||
|
|
||
|
COPY . .
|
||
|
ARG NODE_ENV=""
|
||
|
RUN env ${NODE_ENV} yarn build:prod
|
||
|
|
||
|
## -- stage: dist => nginx --
|
||
|
FROM nginx:alpine
|
||
|
|
||
|
ENV TZ=Asia/Shanghai
|
||
|
|
||
|
COPY ./nginx.conf /etc/nginx/conf.d/default.conf
|
||
|
COPY --from=DIST /admim/dist /usr/share/nginx/html
|
||
|
|
||
|
EXPOSE 80
|