build docker

This commit is contained in:
AceDataCloud committed 2022-02-04 16:32:38 +08:00
1 parent 903e7040f0
commit ed255ee070
11 files changed
+54 -94

No files matched your search

+2 -1
View File
@@ -1,7 +1,7 @@
# build stage
FROM node:lts-alpine as build-stage
WORKDIR /app
COPY package*.json ./
COPY package.json yarn.lock ./
RUN yarn
COPY . .
RUN yarn build
@@ -9,5 +9,6 @@ RUN yarn build
# production stage
FROM nginx:stable-alpine as production-stage
COPY --from=build-stage /app/dist /usr/share/nginx/html
COPY nginx.conf /etc/nginx/conf.d/default.conf
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]