private List<String> getPortsFromBuildConfiguration(ImageConfiguration image) {
        // No build, no default service (doesn't make much sense to have no build config, though)
        BuildImageConfiguration buildConfig = image.getBuildConfiguration();
        if (buildConfig == null) {
            return Collections.emptyList();
        }

        return buildConfig.getPorts();
    }
private List < String > getPortsFromBuildConfiguration ( ImageConfiguration image ) { BuildImageConfiguration buildConfig = image . getBuildConfiguration ( ) ; if ( buildConfig == null ) { return Collections . emptyList ( ) ; } return buildConfig . getPorts ( ) ; }
Examine images for build configuration and extract all ports