diff --git a/.dockerignore b/.dockerignore index 84a01788b75f14..0b59b8b9cede9b 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,6 +1,5 @@ **/node_modules/ -*/build/ -*/*/build/ + **/venv/ **/.tox/ **/.mypy_cache/ @@ -9,19 +8,32 @@ **/__pycache__/ out **/*.class -# Have to copy gradle/wrapper/gradle-wrapper.jar, can't exclude ALL jars -**/build/**/*.jar -# Jars/Wars that are final outputs of java projects. + +# Exclude source code (not needed in Docker images, only build artifacts) +**/*.java + +# Exclude unnecessary build subdirectories but keep libs/ +**/build/classes/ +**/build/generated/ +**/build/reports/ +**/build/test-results/ +**/build/tmp/ +# Jars/Wars that are final outputs of java projects - keep these! !**/build/libs/*.war !**/build/libs/*.jar !datahub-frontend/build/stage/main/** -# Content in .git is used to get the git version -# Just ignore the heavy parts that are not used -.git/logs -.git/COMMIT_* -.git/index +# Content in .git is used to get the git version during gradle stage, not in docker builds. +.git .gradle +**/.gradle/ /metadata-ingestion/tests /metadata-ingestion/examples + +# Exclude - included via datahub-frontend +datahub-web-react/ + +# Exclude docs build artifacts +docs-website/build/ +docs-website/.docusaurus/ diff --git a/docker/build.gradle b/docker/build.gradle index c63cffdf201939..8d2802911719ad 100644 --- a/docker/build.gradle +++ b/docker/build.gradle @@ -451,6 +451,7 @@ quickstart_configs.each { taskName, config -> } else { buildCmd += ["docker", "buildx" ] buildCmd +=bakeCmdArgs + buildCmd += ["--provenance=false"] } commandLine buildCmd workingDir rootProject.projectDir