Frameworks
Spring Boot .dockerignore
.dockerignore for frameworks projects
.dockerignore Content
# ============================================================================
# Created by https://dockerignore.com/
# COMPREHENSIVE FRAMEWORK TEMPLATE for Spring Boot
# Website: https://spring.io/projects/spring-boot
# Repository: https://github.com/spring-projects/spring-boot
# ============================================================================
# ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
# TEMPLATE OVERVIEW & USAGE NOTES
# ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
# • TEMPLATE TYPE: COMPREHENSIVE FRAMEWORK TEMPLATE
# • PURPOSE: Spring Boot framework specific ignore patterns
# • DESIGN PHILOSOPHY: Self-contained with all necessary patterns including security
# • COMBINATION GUIDANCE: Use standalone - no need to combine with other templates
# • SECURITY CONSIDERATIONS: Includes security patterns for .env files and credentials
# • BEST PRACTICES: Review before use, test with your specific Spring Boot setup
# • OFFICIAL SOURCES: Spring Boot community patterns and best practices
# ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
# SECURITY & SENSITIVE DATA PROTECTION (ALWAYS FIRST!)
# ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
# CRITICAL: Prevent sensitive data from being included in Docker images
# ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
# ENVIRONMENT VARIABLES & CONFIGURATION FILES
# ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
# Environment files contain sensitive API keys, database credentials,
# and other secrets that must not be included in Docker images
.env
.env.*
.env.*.local
.env.development
.env.development.local
.env.example
.env.local
.env.production
.env.production.local
.env.sample
.env.staging
.env.staging.local
.env.template
.env.test
.env.test.local
# ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
# APPLICATION SECRETS & CREDENTIALS
# ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
# Application secrets, credentials, and sensitive configuration files
**/config/credentials.*
**/config/secrets.*
**/keys/
**/passwords/
**/private/
**/secrets/
*.auth
*.authz
*.password
*.secret
*.secrets
*.token
*_tokens
*password*
apikeys.*
appsettings.Development.json
appsettings.Local.json
appsettings.Staging.json
connectionstrings.config
credentials
database.ini
database.yml
dbconfig.xml
secrets.json
secrets.yaml
secrets.yml
tokens.*
# ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
# BUILD ARTIFACTS AND OUTPUT
# ============================================================================
**/_output/
**/build/
**/out/
**/test-output/
# ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
# CACHE AND TEMPORARY FILES
# ============================================================================
**/.cache/
**/temp/
**/tmp/
*.cache
*.temp
*.tmp
# ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
# LOGS AND DEBUG FILES
# ============================================================================
**/.logs/
**/logs/
*.log
# ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
# CONFIGURATION AND ENVIRONMENT
# ============================================================================
.env.testing
# ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
# TESTING AND COVERAGE
# ============================================================================
**/.coverage/
**/__coverage__/
**/coverage/
**/failsafe-reports/
**/jacoco-reports/
**/jmeter-reports/
**/surefire-reports/
**/test-results/
# ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
# OTHER
# ============================================================================
**/*.settings/
**/.bazel/
**/.bzr/
**/.cvs/
**/.debug/
**/.debugs/
**/.git/
**/.gradle/
**/.gradle/buildOutputCleanup/
**/.gradle/buildScan/
**/.gradle/caches/
**/.gradle/daemon/
**/.gradle/native/
**/.gradle/notifications/
**/.gradle/test-kit/
**/.gradle/test-output/
**/.gradle/tooling/
**/.gradle/workers/
**/.hg/
**/.log/
**/.m2/
**/.m2/repository/
**/.m2/wrapper/
**/.micronaut/
**/.mvn/
**/.spring/
**/.svn/
**/actuator/
**/debug/
**/debugs/
**/gradle/
**/m2/
**/maven/
**/mvn/
**/target/
**/test-reports/
**/test/
**/tests/
*.bak
*.class
*.classpath
*.ctxt
*.ear
*.factorypath
*.jar
*.javac
*.javadoc
*.jsp
*.jsp.bak
*.jsp.old
*.jsp.save
*.jsp.swo
*.jsp.swp
*.jspf
*.jspf.bak
*.jspf.old
*.jspf.save
*.jspf.swo
*.jspf.swp
*.jspf~
*.jspx
*.jspx.bak
*.jspx.old
*.jspx.save
*.jspx.swo
*.jspx.swp
*.jspx~
*.jsp~
*.jws
*.jws.bak
*.jws.old
*.jws.save
*.jws.swo
*.jws.swp
*.jws~
*.nar
*.old
*.orig
*.project
*.rar
*.save
*.spec.java
*.swo
*.swp
*.test.java
*.war
*~
._*
.bazelrc
.DS_Store
.DS_Store?
.gitattributes
.gitignore
.gitmodules
.gradle/*
.gradle/wrapper/*
.m2/settings-security.xml
.mvn/timing.properties
.mvn/wrapper/maven-wrapper.jar
.Spotlight-V100
.springBeans
.Trashes
application-*.properties
application-*.yaml
application-*.yml
bazel-*
config/application-*.properties
config/application-*.yaml
config/application-*.yml
desktop.ini
ehthumbs.db
gradle-app.setting
gradle-wrapper.jar
hs_err_pid*
mvnw
mvnw.cmd
pom.xml.releaseBackup
pom.xml.tag
pom.xml.versionsBackup
Thumbs.db