# feature-container-runtime-contract — .dockerignore for src/ build context # # The docker build context is src/ (the Gradle root). This file excludes build # noise that must not enter the image build context, while keeping everything # the builder stage needs to resolve dependencies and run bootJar. # ---- Build recipe itself ---------------------------------------------------- # The Dockerfile is supplied with `-f` and is never needed inside the context. Leaving it in means # `COPY . .` embeds it in the image AND makes every Dockerfile edit — a comment included — invalidate # the cached dependency-resolution layer, which costs a full Gradle re-resolve (~3 min) for a change # that affects nothing the builder reads. Dockerfile Dockerfile.* .dockerignore # ---- Version control -------------------------------------------------------- .git .gitignore .gitattributes # ---- Gradle build output ---------------------------------------------------- # Exclude all module build/ directories; the builder stage produces them inside the container. build/ **/build/ .gradle/ **/.gradle/ # ---- IDE / editor files ----------------------------------------------------- .idea/ **/.idea/ *.iml .vscode/ **/.vscode/ *.eclipse .project .classpath .settings/ # ---- Documentation / governance (not needed for image build) ---------------- # Root CLAUDE.md and AGENTS.md are governance docs; not needed at build time. *.md docs/ # ---- Environment / secrets (NEVER bake secrets into image layers) ----------- .env **/.env *.env # ---- OS artifacts ----------------------------------------------------------- .DS_Store **/.DS_Store Thumbs.db # ---- Test reports and coverage ---------------------------------------------- **/test-results/ **/reports/ **/jacoco/ # ---- Explicitly keep (negation rules to be safe) ---------------------------- # The Gradle wrapper, source trees, and build configuration are needed. # Negation rules are not strictly required because the above globs don't # accidentally exclude src/*, but listed for clarity. !gradlew !gradlew.bat !gradle/ !**/src/ !**/build.gradle !settings.gradle