public static String firstRegistryOf ( String ... checkFirst ) { for ( String registry : checkFirst ) { if ( registry != null ) { return registry ; } } // Check environment as last resort return System . getenv ( "DOCKER_REGISTRY" ) ; }
Return the first non null registry given . Use the env var DOCKER_REGISTRY as final fallback