cool-admin-vue/Dockerfile

15 lines
322 B
Docker
Raw Normal View History

2021-03-19 16:41:03 +08:00
FROM node:lts-alpine
WORKDIR /build
2021-05-28 11:38:42 +08:00
# 设置npm镜像
2024-03-28 12:49:53 +08:00
RUN npm config set registry https://registry.npmmirror.com
2021-03-19 16:41:03 +08:00
COPY package.json /build/package.json
2024-03-28 12:49:53 +08:00
RUN npm install
2021-03-19 16:41:03 +08:00
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
2023-09-28 13:50:15 +08:00
EXPOSE 80