mirror of
https://github.com/wahyd4/SAI2.git
synced 2026-08-09 05:06:05 +10:00
更新dockerfile文件
This commit is contained in:
+21
@@ -0,0 +1,21 @@
|
||||
# 使用官方 Python 基础镜像
|
||||
FROM python:3.9
|
||||
|
||||
# 设置工作目录
|
||||
WORKDIR /
|
||||
|
||||
# 将当前目录内容复制到容器的 / 目录
|
||||
COPY . /
|
||||
|
||||
# 安装 Python 依赖
|
||||
RUN pip install --no-cache-dir -r requirements.txt
|
||||
|
||||
# 切换到 web 目录,安装 Node.js 依赖并构建 web 应用
|
||||
WORKDIR /web
|
||||
RUN npm install && npm run build
|
||||
|
||||
# 切换回根目录
|
||||
WORKDIR /
|
||||
|
||||
# 运行 Python 服务器
|
||||
CMD ["python", "search4all.py"]
|
||||
Reference in New Issue
Block a user