From 2e8f8294d0bd17d0d9f66866ee588f32f5c31a09 Mon Sep 17 00:00:00 2001 From: jiangsir <1463310682@qq.com> Date: Thu, 12 Sep 2024 18:57:54 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E6=96=87=E4=BB=B6=E8=87=B3?= =?UTF-8?q?=20/?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..5c51e4f --- /dev/null +++ b/Dockerfile @@ -0,0 +1,20 @@ +# 使用一个基础镜像,例如Python官方镜像 +FROM python:3.9 + +# 设置工作目录 +WORKDIR /app + +# 复制应用程序文件到容器中 +COPY app.py /app/app.py +COPY /templates /app/templates +COPY requirements.txt /app/requirements.txt +COPY file/flag.sh /flag.sh +RUN chmod +x /flag.sh +# 安装应用程序依赖项 +RUN pip install -r requirements.txt + +# 暴露应用程序运行的端口 +EXPOSE 5000 + +CMD ["/flag.sh"] +