From db4dd27c21093300afd0c462ecabb89ce868850f Mon Sep 17 00:00:00 2001 From: liuyebo <1515783401@qq.com> Date: Tue, 11 Jun 2024 10:26:42 +0800 Subject: [PATCH] dockerfile --- DockerFile | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 DockerFile diff --git a/DockerFile b/DockerFile new file mode 100644 index 0000000..d6b8cb1 --- /dev/null +++ b/DockerFile @@ -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"] \ No newline at end of file