# 使用 Alpine Linux 作为基础镜像 FROM alpine:latest # 安装必要的工具 RUN apk add --no-cache git nodejs npm # 设置工作目录 WORKDIR /app # 克隆仓库 RUN git clone https://github.com/xororz/web-realesrgan.git . # 安装项目依赖 RUN npm install # 构建应用 RUN npm run build # 暴露端口 (Vite 默认使用 5173 端口) EXPOSE 5173 RUN chmod -R 777 /app # 启动应用 CMD ["npm", "run", "dev", "--", "--host", "0.0.0.0"]