private boolean buildConfigured ( BuildImageConfiguration config , ValueProvider valueProvider , MavenProject project ) { if ( isStringValueNull ( valueProvider , config , FROM , ( ) -> config . getFrom ( ) ) ) { return true ; } if ( valueProvider . getMap ( FROM_EXT , config == null ? null : config . getFromExt ( ) ) != null ) { return true ; } if ( isStringValueNull ( valueProvider , config , DOCKER_FILE , ( ) -> config . getDockerFileRaw ( ) ) ) { return true ; } if ( isStringValueNull ( valueProvider , config , DOCKER_ARCHIVE , ( ) -> config . getDockerArchiveRaw ( ) ) ) { return true ; } if ( isStringValueNull ( valueProvider , config , CONTEXT_DIR , ( ) -> config . getContextDirRaw ( ) ) ) { return true ; } if ( isStringValueNull ( valueProvider , config , DOCKER_FILE_DIR , ( ) -> config . getDockerFileDirRaw ( ) ) ) { return true ; } // Simple Dockerfile mode return new File ( project . getBasedir ( ) , "Dockerfile" ) . exists ( ) ; }
Enable build config only when a . from . . dockerFile . or . dockerFileDir . is configured