From 1e12baeb2674881b75ccf906b6545ab3320b8b5d Mon Sep 17 00:00:00 2001 From: Vishal Kumar Singh Date: Sat, 16 May 2026 12:07:05 +0530 Subject: [PATCH] build: expand .dockerignore to avoid unnecessary cache invalidation The Dockerfile copies the entire source tree with COPY . ., which means any change to .git/, docs/, examples/, or other non-build files invalidates the Docker layer cache. Add exclusions for: - .git/ (changes on every commit) - Documentation and examples - Editor/tool configs - Development-only files --- .dockerignore | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/.dockerignore b/.dockerignore index ec905b5eb8..99f43d532a 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,2 +1,33 @@ bin/ tmp/ + +# Git metadata - changes on every commit and invalidates Docker cache +.git/ +.gitignore + +# CI/CD and GitHub files +.github/ + +# Documentation - not needed for runtime +docs/ +*.md +LICENSE + +# Examples and development configs +examples/ +config.dev.yaml +config.yaml.dist +docker-compose*.yaml +docker-compose*.dist + +# Editor and tool configs +.editorconfig +.envrc +.golangci.yaml + +# Nix flakes +flake.lock +flake.nix + +# The Dockerfile itself +Dockerfile