From 7fe9f7a9406d6c7d4c4ef03d3f843c781480771b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=8F=E8=9A=82=E8=9A=81=E4=BA=91?= Date: Sat, 12 Sep 2026 10:35:19 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .dockerignore | 102 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 102 insertions(+) create mode 100644 .dockerignore diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..7db7810 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,102 @@ +# ============================================================ +# .dockerignore —— 排除不需要进入构建上下文的文件 +# 位置:项目根目录,与 manage.py 同级 +# ============================================================ + +# ------------------------------------------------------------ +# 版本控制(避免 .git 进镜像,省体积、防泄露) +# ------------------------------------------------------------ +.git +.gitignore +.gitattributes +.gitmodules + +# ------------------------------------------------------------ +# Python 缓存与编译产物 +# ------------------------------------------------------------ +__pycache__ +*.pyc +*.pyo +*.pyd +*.py[cod] +*$py.class +.pytest_cache +.mypy_cache +.ruff_cache +.coverage +.coverage.* +htmlcov +.tox +.nox + +# ------------------------------------------------------------ +# 虚拟环境 +# ------------------------------------------------------------ +venv +.venv +env +ENV +virtualenv + +# ------------------------------------------------------------ +# Python 打包产物 +# ------------------------------------------------------------ +build +dist +*.egg-info +*.egg +.eggs +pip-wheel-metadata + +# ------------------------------------------------------------ +# 前端依赖与构建产物 +# ------------------------------------------------------------ +node_modules +npm-debug.log +yarn-error.log +pnpm-debug.log +.ui-build + +# ------------------------------------------------------------ +# 日志与本地数据库 +# ------------------------------------------------------------ +*.log +logs +*.sqlite3 +*.db +*.sql.gz + +# ------------------------------------------------------------ +# 编辑器与 IDE +# ------------------------------------------------------------ +.DS_Store +Thumbs.db +.idea +.vscode +*.swp +*.swo +*~ + +# ------------------------------------------------------------ +# CI / 部署配置(保留 .jenkins/Dockerfile) +# ------------------------------------------------------------ +.jenkins/* +!.jenkins/Dockerfile +jenkins +*.jenkins + +# ------------------------------------------------------------ +# 项目自定义排除 +# ------------------------------------------------------------ +# 前端 UI 目录(按需排除,如不需要可删) +/ui + +# 本地环境变量文件 +.env +.env.* +*.local + +# 文档与说明(按需保留) +# README.md +# docs +# *.md \ No newline at end of file