浏览代码

add dockerfile

Aneurin Barker Snook 2 月之前
父节点
当前提交
1924a76688
共有 1 个文件被更改,包括 17 次插入0 次删除
  1. 17 0
      Dockerfile

+ 17 - 0
Dockerfile

@@ -0,0 +1,17 @@
+FROM node:22-alpine AS build
+
+WORKDIR /app
+
+COPY package.json package-lock.json ./
+
+RUN npm ci
+
+COPY public ./public
+COPY src ./src
+COPY eslint.config.js index.html tsconfig.json ./
+
+RUN npm run build
+
+FROM nginx:1.27-alpine
+
+COPY --from=build /app/dist /usr/share/nginx/html