Skip to content

build(docker): exclude local runtime state from build context#3246

Open
BXL1015 wants to merge 1 commit into
bytedance:mainfrom
BXL1015:build/dockerignore-runtime-state
Open

build(docker): exclude local runtime state from build context#3246
BXL1015 wants to merge 1 commit into
bytedance:mainfrom
BXL1015:build/dockerignore-runtime-state

Conversation

@BXL1015
Copy link
Copy Markdown

@BXL1015 BXL1015 commented May 26, 2026

Summary

  • Exclude local DeerFlow configuration files from Docker build contexts, including root-level and legacy backend/ config paths.
  • Exclude local runtime state directories (.deer-flow/ and backend/.deer-flow/).
  • Keep Docker build inputs aligned with files that are already treated as local-only by .gitignore.

The documented Docker setup has contributors create config.yaml before Docker image builds. Without matching .dockerignore entries, these local config/runtime files can still be sent in the Docker build context. In particular, backend/.deer-flow/ can be copied into backend image layers by COPY backend ./backend.

This is a build hygiene hardening change, not a security vulnerability report.

Test plan

  • git diff --check -- .dockerignore
  • Built a temporary Docker sentinel context with local config/runtime files and verified they are excluded while normal backend files remain included

Copilot AI review requested due to automatic review settings May 26, 2026 09:45
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Updates the Docker build context exclusions to prevent project configuration files and related directories from being sent to the Docker daemon during builds.

Changes:

  • Added config file patterns (YAML/JSON and backups) to .dockerignore
  • Added .deer-flow/ directories (root and backend) to .dockerignore

Comment thread .dockerignore
Comment on lines +48 to +61
config.yaml
config.yml
configure.yml
mcp_config.json
extensions_config.json
config.yaml.bak
backend/config.yaml
backend/config.yml
backend/configure.yml
backend/mcp_config.json
backend/extensions_config.json
backend/config.yaml.bak
.deer-flow/
backend/.deer-flow/
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Keeping the root/backend entries explicit is intentional: those are the supported local config locations today. A broader ** pattern would also exclude unrelated fixture or nested config files.

Comment thread .dockerignore
Comment on lines +52 to +58
extensions_config.json
config.yaml.bak
backend/config.yaml
backend/config.yml
backend/configure.yml
backend/mcp_config.json
backend/extensions_config.json
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These files are runtime/local configs rather than Docker build inputs. The checked-in templates remain included, and Compose mounts runtime configs; the sentinel build also verified normal backend files still enter the context.

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented May 26, 2026

CLA assistant check
All committers have signed the CLA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants