We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3b0a38f commit 79f8457Copy full SHA for 79f8457
Dockerfile
@@ -1,17 +1,16 @@
1
# 构建阶段
2
-FROM node:20.19.0-alpine3.21 AS build
+FROM node:20-bullseye-slim AS build
3
WORKDIR /app
4
COPY . .
5
RUN npm install && \
6
npm run build
7
8
# 运行阶段
9
-FROM svenstaro/miniserve:0.29.0-alpine AS runtime
10
-# 设置端口
11
-ENV MINISERVE_PORT=8080
+FROM node:20-bullseye-slim AS runtime
12
13
COPY --from=build /app/dist /app
+RUN npm install -g http-server
14
15
EXPOSE 8080
16
17
-CMD ["--index", "/app/index.html"]
+CMD ["http-server", "/app", "-p", "8080"]
0 commit comments