sugar404 commited on
Commit
4189c97
·
verified ·
1 Parent(s): ea904ee

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +25 -0
Dockerfile ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # 使用 Alpine Linux 作为基础镜像
2
+ FROM alpine:latest
3
+
4
+ # 安装必要的工具
5
+ RUN apk add --no-cache git nodejs npm
6
+
7
+ # 设置工作目录
8
+ WORKDIR /app
9
+
10
+ # 克隆仓库
11
+ RUN git clone https://github.com/xororz/web-realesrgan.git .
12
+
13
+ # 安装项目依赖
14
+ RUN npm install
15
+
16
+ # 构建应用
17
+ RUN npm run build
18
+
19
+ # 暴露端口 (Vite 默认使用 5173 端口)
20
+ EXPOSE 5173
21
+
22
+ RUN chmod -R 777 /app
23
+
24
+ # 启动应用
25
+ CMD ["npm", "run", "dev", "--", "--host", "0.0.0.0"]