chore: add .dockerignore to optimize Docker build#174
chore: add .dockerignore to optimize Docker build#174xu826Jamin wants to merge 1 commit intoc2siorg:mainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a new repo-root .dockerignore intended to reduce Docker build context size by excluding VCS metadata, dependency directories, caches, and local environment/editor files.
Changes:
- Introduces a
.dockerignorewith ignore rules for Git, Python, Node, build outputs, env files, and IDE/OS artifacts.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| # Git | ||
| .git | ||
| .gitignore | ||
|
|
There was a problem hiding this comment.
With the current docker-compose.yml, both services build from subdirectory contexts (./gdbui_server and ./webapp) and specify DockerFile.dev in those directories. Docker only applies .dockerignore from the build context root, so a repo-root .dockerignore will not affect these builds. To actually optimize builds, add .dockerignore files inside gdbui_server/ (backend) and/or update the compose build contexts to the repo root (and adjust dockerfile paths accordingly).
This PR fixes #69
Description
.dockerignorefile to prevent unnecessary files from beingcopied into the Docker build context.
venv/,__pycache__,*.pyc)node_modules/).git/).env).DS_Store,.vscode/)Additional context
and cache files, making builds unnecessarily slow and images larger.