# 让镜像只带源码与运行必需文件,别把本机的浏览器 profile / 日志 / 凭据 / node_modules 打进去 node_modules .run-profile .run-tmp run-logs *.log # 凭据绝对不能进镜像层 .env .env.* !.env.example runner.local.mjs # 开发工具与文档:容器里跑无头用不到,省体积 .git .gitattributes .gitignore .vscode .idea docs dev/tests # 镜像自身文件(entrypoint.sh 由 Dockerfile 单独 COPY,这里的 .dockerignore 规则不影响) Dockerfile docker-compose.yml .dockerignore