35 lines
1.0 KiB
Plaintext
35 lines
1.0 KiB
Plaintext
# .dockerignore - 别把没用的东西送进构建上下文
|
|
#
|
|
# 构建上下文越小,podman/docker 传得越快;更重要的是,**有些东西绝不能被
|
|
# COPY 进去**。这里每一条都写清楚为什么。
|
|
|
|
# 构建产物:容器里会重新编,带进去只会让缓存失效、还可能串味
|
|
# (比如本机 build/static-prefix 是给本机路径编的,进容器就废了)
|
|
build/
|
|
ligent
|
|
ligent-static
|
|
*.o
|
|
|
|
# 版本控制:容器里用 --build-arg VERSION 传版本号,不需要 .git。
|
|
# 而且 .git 可能有几百 MB,是构建上下文里最大的一块。
|
|
.git/
|
|
.gitignore
|
|
|
|
# 本地运行期状态:配置和密钥绝不能进镜像。
|
|
# ligent.json 里可能写着 API key —— 这是最要紧的一条。
|
|
ligent.json
|
|
ligent.archive/
|
|
ligent.history
|
|
ligent.history.tmp
|
|
|
|
# 测试:不需要它们来构建。带上会让"改一行测试"也触发镜像重建。
|
|
tests/
|
|
|
|
# 文档在容器里用不上(scratch 镜像里没有 cat,放进去也读不了)
|
|
README.md
|
|
LICENSE
|
|
|
|
# Python 缓存
|
|
__pycache__/
|
|
*.pyc
|