dockerfile
This commit is contained in:
17
DockerFile
Normal file
17
DockerFile
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
# 使用官方的Python基础镜像
|
||||||
|
FROM python:3.12
|
||||||
|
|
||||||
|
# 设置工作目录
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
# 将当前目录内容复制到容器的/app内
|
||||||
|
COPY ./
|
||||||
|
|
||||||
|
# 安装任何需要的包
|
||||||
|
RUN pip install --no-cache-dir -r requirements.txt
|
||||||
|
|
||||||
|
# 暴露端口
|
||||||
|
EXPOSE 8081
|
||||||
|
|
||||||
|
# 运行你的Python应用
|
||||||
|
CMD ["python", "./main.py"]
|
||||||
Reference in New Issue
Block a user