From 0564593a84c59abf80cd75cac8880e498326c8b5 Mon Sep 17 00:00:00 2001 From: spdis Date: Sat, 15 Nov 2025 18:06:48 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A1=A5=E5=85=85=E4=B8=A4=E4=B8=AA=E6=BC=8F?= =?UTF-8?q?=E4=BC=A0=E7=9A=84=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .dockerignore | 15 +++++++++++++++ Dockerfile | 4 +++- 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 .dockerignore diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..6d17a9c --- /dev/null +++ b/.dockerignore @@ -0,0 +1,15 @@ +__pycache__/ +*.pyc +*.pyo +*.pyd +*.log +.DS_Store +.env +.venv/ +venv/ +node_modules/ +.git/ +.gitignore +db.sqlite3 +media/ +staticfiles/ \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index 9a6fc34..d111d59 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,7 +12,9 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ && rm -rf /var/lib/apt/lists/* COPY requirements.txt /app/ -RUN pip install --no-cache-dir -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple +RUN pip install --no-cache-dir -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple \ + && apt-get purge -y --auto-remove build-essential \ + && rm -rf /var/lib/apt/lists/* COPY . /app