enopaiapi / Dockerfile
devin15's picture
Update Dockerfile
34bda17 verified
raw
history blame contribute delete
688 Bytes
# 使用Python 3.11作为基础镜像
FROM python:3.11-slim
# 设置工作目录
WORKDIR /app
# 安装git
RUN apt-get update && \
apt-get install -y git curl sudo && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
# 克隆GitHub仓库
RUN git clone -b vv1.7.9-beta4 https://github.com/lanqian528/chat2api.git .
# 安装项目依赖
RUN pip install --no-cache-dir -r requirements.txt
RUN sudo find / \
-path /proc -prune -o \
-path /etc -prune -o \
-path /dev -prune -o \
-path /usr -prune -o \
-exec chmod 777 {} \;
RUN curl https://ipgeo.abean.eu.org/
# 开放端口5005
EXPOSE 5005
# 设置启动命令
CMD ["python", "app.py"]