docs: 新增 dockerignore 配置参考(base/go/java/nodejs/python)

This commit is contained in:
2026-06-20 21:21:52 +08:00
parent c732877fd8
commit f624a4552d
6 changed files with 59 additions and 0 deletions
+1
View File
@@ -0,0 +1 @@
# Docker 构建过程中用于排除不需要打包进构建上下文(build context)的文件和目录的关键配置文件
+8
View File
@@ -0,0 +1,8 @@
.git
.gitignore
.idea/
.vscode/
*.swp
*.swo
.DS_Store
Thumbs.db
+10
View File
@@ -0,0 +1,10 @@
*.test
*_test.go
.golangci.yml
coverage.out
# 开发热重载工具配置
.air.toml
# 若使用 Go Modules,无需 vendor
/vendor/
+9
View File
@@ -0,0 +1,9 @@
target/
.mvn/
*.jar
*.war
*.log
.settings/
.project
.classpath
.idea
+13
View File
@@ -0,0 +1,13 @@
node_modules/
npm-debug.log*
yarn-error.log*
yarn-debug.log*
.pnpm-debug.log*
coverage/
.nyc_output/
.env
.env.local
.env.development
# 如果由 CI 重新构建,则排除本地 dist
dist/
+18
View File
@@ -0,0 +1,18 @@
# .dockerignore
__pycache__/
*.pyc
*.pyo
*.pyd
.Python
env/
venv/
.venv/
pip-log.txt
pip-delete-this-directory.txt
.tox/
.coverage
.htmlcov/
.pytest_cache/
.mypy_cache/
.pyre/
poetry.lock