Skip to content

devops(docker): exclude .git from the Docker build context - #2037

Merged
Yury Semikhatsky (yury-s) merged 3 commits into
microsoft:mainfrom
yury-s:dockerignore-git
Nov 3, 2026
Merged

Yury Semikhatsky (yury-s) merged 3 commits into
microsoft:mainfrom
yury-s:dockerignore-git

Conversation

@yury-s

@yury-s Yury Semikhatsky (yury-s) commented Nov 3, 2026 •

Copy link
Copy Markdown
Member

The repository root is the Docker build context, and the image build copies all of it into the image. Exclude from the build context:

  • **/.git, including nested checkouts and submodules.
  • Registry credentials and local environment files: **/.npmrc, **/.env*.

@yury-s
Yury Semikhatsky (yury-s) merged commit 36f78cc into microsoft:main Nov 3, 2026
13 of 14 checks passed
Yury Semikhatsky (yury-s) added a commit to yury-s/playwright-java that referenced this pull request Nov 3, 2026
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.

2 participants