Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
161 changes: 161 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,161 @@
# .dockerignore for Orion (Rust project)
# Purpose: reduce Docker build context, avoid copying local dev artifacts,
# and keep images smaller/faster to build.

# -------------------------
# Version control
# -------------------------
.git/
.gitattributes
# (keep .gitignore tracked — no need to ignore it)

# -------------------------
# Rust build artifacts
# -------------------------
target/
**/target/

# Cargo registry and cache
.cargo/
.cargo-ok

# -------------------------
# Editor / IDE files
# -------------------------
.vscode/
.idea/
*.swp
*.swo
*~
.*.swp
.~*

# -------------------------
# OS artifacts
# -------------------------
.DS_Store
Thumbs.db
desktop.ini
ehthumbs.db

# -------------------------
# Logs and envs
# -------------------------
*.log
logs/
.env
.env.local
.env.*.local

# -------------------------
# Temp and cache
# -------------------------
tmp/
temp/
*.tmp
.cache/

# -------------------------
# Compiled binaries & libs
# -------------------------
*.exe
*.dll
*.so
*.dylib

# -------------------------
# Archives & large files
# -------------------------
*.tar.gz
*.zip
*.rar
# *.csv # Uncomment if you have large CSV data files you want to exclude from the build context.
*.bak
*.backup

# -------------------------
# Node / frontend artifacts (if any)
# -------------------------
node_modules/
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# -------------------------
# Python virtual envs
# -------------------------
Copy link
Member

Choose a reason for hiding this comment

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

nit: no python related code now, add in the future if needed.

venv/
env/
.venv/

# -------------------------
# Toolchain / formatters (not needed inside image)
# -------------------------
rust-toolchain
rust-toolchain.toml
clippy.toml
rustfmt.toml

# -------------------------
# Examples, demos, tests (prod images typically don't need these)
# -------------------------
examples/
demos/
benches/
**/benches/

# Exclude tests but keep some bootstrap files used in CI/runtime
tests/
**/tests/
!orion-data-plane-api/tests/bootstrap*.yml

# Docs and performance artifacts
docs/_build/
docs/build/
docs/pics/
docs/videos/
docs/performance/

# Tools and local scripts not needed in image
tools/

# Coverage / profiling
coverage/
*.profraw
*.prof

# PlantUML
*.plantuml

# Config examples to exclude
orion-configuration/examples/
orion-xds/examples/

# Keep essential repo/build files (whitelist)
!README.md
!LICENSE
!Cargo.toml
!Cargo.lock

# -------------------------
# NOTE about Dockerfile / docker/ directory
# -------------------------
# DO NOT uncomment these lines unless you are absolutely sure your
# normal build never needs the repository-level Dockerfile or contents
# of the docker/ directory. Ignoring them will break common `docker build .`
# workflows. If your build always runs from inside docker/, you may
# choose to uncomment.
# docker/
# Dockerfile*
# If you DO need specific scripts from docker/, explicitly ignore other files
# instead of the whole directory (or ensure you build using -f docker/Dockerfile).

# -------------------------
# Shell scripts
# -------------------------
# Be cautious: ignore generic *.sh only if you are certain no build scripts are required.
# Commented out by default to avoid excluding build helpers.
# *.sh
# If you want to exclude local helper scripts, list them explicitly, e.g.
# scripts/local-only.sh
!docker/*.sh
Comment on lines +156 to +161
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

The rule !docker/*.sh on line 161 is currently a no-op because the general *.sh exclusion on line 158 is commented out. While it's intended to act as a safeguard if someone uncomments line 158, its current placement and active status can be confusing.

A clearer approach would be to group the related rules and comment them out together with an explanation of how to use them. This improves the clarity and maintainability of the file.

# Be cautious: ignore generic *.sh only if you are certain no build scripts are required.
# To ignore most shell scripts while keeping essential build scripts in the `docker/` directory,
# you can uncomment the following two lines.
# *.sh
# !docker/*.sh

Copy link
Contributor Author

Choose a reason for hiding this comment

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

i do not think it can cause any failure ,also i have added a descriptive comment for the reader to understand so it may not be confusing as well .However it is not that important so if you like i can comment that out