mirror of
https://gitee.com/huangge1199_admin/vue-pro.git
synced 2025-01-31 17:40:05 +08:00
perf: admin/Dockerfile 挂载包管理器缓存目录
This commit is contained in:
parent
97502c8b51
commit
c3d9439030
@ -1,11 +1,10 @@
|
|||||||
FROM node:16-alpine as DIST
|
FROM node:16-alpine as build-stage
|
||||||
|
|
||||||
WORKDIR /admim
|
WORKDIR /admim
|
||||||
|
|
||||||
COPY ./package.json .
|
COPY .npmrc package.json yarn.lock ./
|
||||||
COPY ./yarn.lock .
|
RUN --mount=type=cache,id=yarn-store,target=/root/.yarn-store \
|
||||||
COPY ./.npmrc .
|
yarn install
|
||||||
RUN yarn install
|
|
||||||
|
|
||||||
COPY . .
|
COPY . .
|
||||||
ARG NODE_ENV=""
|
ARG NODE_ENV=""
|
||||||
@ -17,6 +16,6 @@ FROM nginx:alpine
|
|||||||
ENV TZ=Asia/Shanghai
|
ENV TZ=Asia/Shanghai
|
||||||
|
|
||||||
COPY ./nginx.conf /etc/nginx/conf.d/default.conf
|
COPY ./nginx.conf /etc/nginx/conf.d/default.conf
|
||||||
COPY --from=DIST /admim/dist /usr/share/nginx/html
|
COPY --from=build-stage /admim/dist /usr/share/nginx/html
|
||||||
|
|
||||||
EXPOSE 80
|
EXPOSE 80
|
||||||
|
Loading…
Reference in New Issue
Block a user