diff --git a/core/lib/Drupal/Core/DrupalKernel.php b/core/lib/Drupal/Core/DrupalKernel.php
index ee45da3..ed2999f 100644
--- a/core/lib/Drupal/Core/DrupalKernel.php
+++ b/core/lib/Drupal/Core/DrupalKernel.php
@@ -525,20 +525,8 @@ public function discoverServiceProviders() {
     }
     $module_filenames = $this->getModuleFileNames();
     $this->classLoaderAddMultiplePsr4($this->getModuleNamespacesPsr4($module_filenames));
+    $class = $this->discoverModuleServiceProviders($module_filenames);
 
-    // Load each module's serviceProvider class.
-    foreach ($module_filenames as $module => $filename) {
-      $camelized = ContainerBuilder::camelize($module);
-      $name = "{$camelized}ServiceProvider";
-      $class = "Drupal\\{$module}\\{$name}";
-      if (class_exists($class)) {
-        $this->serviceProviderClasses['app'][$module] = $class;
-      }
-      $filename = dirname($filename) . "/$module.services.yml";
-      if (file_exists($filename)) {
-        $this->serviceYamls['app'][$module] = $filename;
-      }
-    }
 
     // Add site-specific service providers.
     if (!empty($GLOBALS['conf']['container_service_providers'])) {
@@ -1071,23 +1059,7 @@ protected function compileContainer() {
 
     // Register application services.
     $yaml_loader = new YamlFileLoader($container);
-    foreach ($this->serviceYamls['app'] as $filename) {
-      $yaml_loader->load($filename);
-    }
-    foreach ($this->serviceProviders['app'] as $provider) {
-      if ($provider instanceof ServiceProviderInterface) {
-        $provider->register($container);
-      }
-    }
-    // Register site-specific service overrides.
-    foreach ($this->serviceYamls['site'] as $filename) {
-      $yaml_loader->load($filename);
-    }
-    foreach ($this->serviceProviders['site'] as $provider) {
-      if ($provider instanceof ServiceProviderInterface) {
-        $provider->register($container);
-      }
-    }
+    $this->doRegisterServiceProviders($yaml_loader, $container);
 
     // Identify all services whose instances should be persisted when rebuilding
     // the container during the lifetime of the kernel (e.g., during a kernel
@@ -1101,7 +1073,7 @@ protected function compileContainer() {
     }
     $container->setParameter('persistIds', $persist_ids);
 
-    $container->compile();
+    $this->doCompile($container);
     return $container;
   }
 
@@ -1220,13 +1192,20 @@ protected function getModulesParameter() {
   /**
    * Gets the file name for each enabled module.
    *
+   * @param array $module_list
+   *   (optional) Array of modules to retrieve file-names for. Defaults to all
+   *   modules.
+   *
    * @return array
    *   Array where each key is a module name, and each value is a path to the
    *   respective *.module or *.profile file.
    */
-  protected function getModuleFileNames() {
+  protected function getModuleFileNames($module_list = array()) {
     $filenames = array();
-    foreach ($this->moduleList as $module => $weight) {
+    if (empty($module_list)) {
+      $module_list = $this->moduleList;
+    }
+    foreach ($module_list as $module => $weight) {
       if ($data = $this->moduleData($module)) {
         $filenames[$module] = $data->getPathname();
       }
@@ -1314,4 +1293,64 @@ public static function validateHostname(Request $request) {
     return TRUE;
   }
 
+  /**
+   * Register module service providers.
+   *
+   * @param array $module_filenames
+   *   Array of module filenames.
+   */
+  protected function discoverModuleServiceProviders($module_filenames) {
+    // Load each module's serviceProvider class.
+    foreach ($module_filenames as $module => $filename) {
+      $camelized = ContainerBuilder::camelize($module);
+      $name = "{$camelized}ServiceProvider";
+      $class = "Drupal\\{$module}\\{$name}";
+      if (class_exists($class)) {
+        $this->serviceProviderClasses['app'][$module] = $class;
+      }
+      $filename = dirname($filename) . "/$module.services.yml";
+      if (file_exists($filename)) {
+        $this->serviceYamls['app'][$module] = $filename;
+      }
+    }
+  }
+
+  /**
+   * Registers the service providers.
+   *
+   * @param \Drupal\Core\DependencyInjection\YamlFileLoader $yaml_loader
+   *   Yaml file loader.
+   * @param \Drupal\Core\DependencyInjection\Container $container
+   *   Container builder.
+   */
+  protected function doRegisterServiceProviders($yaml_loader, $container) {
+    foreach ($this->serviceYamls['app'] as $filename) {
+      $yaml_loader->load($filename);
+    }
+    foreach ($this->serviceProviders['app'] as $provider) {
+      if ($provider instanceof ServiceProviderInterface) {
+        $provider->register($container);
+      }
+    }
+    // Register site-specific service overrides.
+    foreach ($this->serviceYamls['site'] as $filename) {
+      $yaml_loader->load($filename);
+    }
+    foreach ($this->serviceProviders['site'] as $provider) {
+      if ($provider instanceof ServiceProviderInterface) {
+        $provider->register($container);
+      }
+    }
+  }
+
+  /**
+   * Compiles the dependency injection container.
+   *
+   * @param \Drupal\Core\DependencyInjection\Container $container
+   *   The container to compile.
+   */
+  protected function doCompile($container) {
+    $container->compile();
+  }
+
 }
diff --git a/core/lib/Drupal/Core/Installer/InstallerKernel.php b/core/lib/Drupal/Core/Installer/InstallerKernel.php
index 4063611..3aadf34 100644
--- a/core/lib/Drupal/Core/Installer/InstallerKernel.php
+++ b/core/lib/Drupal/Core/Installer/InstallerKernel.php
@@ -7,7 +7,13 @@
 
 namespace Drupal\Core\Installer;
 
+use Drupal\Core\DependencyInjection\ContainerBuilder;
+use Drupal\Core\DependencyInjection\ServiceProviderInterface;
 use Drupal\Core\DrupalKernel;
+use Symfony\Component\DependencyInjection\ParameterBag\ParameterBag;
+use Symfony\Component\HttpFoundation\Request;
+use Symfony\Component\HttpFoundation\Response;
+use Symfony\Component\HttpKernel\TerminableInterface;
 
 /**
  * Extend DrupalKernel to handle force some kernel behaviors.
@@ -15,16 +21,44 @@
 class InstallerKernel extends DrupalKernel {
 
   /**
-   * {@inheritdoc}
+   * Container builder for building the container as each module is installed.
    *
-   * @param bool $rebuild
-   *   Force a container rebuild. Unlike the parent method, this defaults to
-   *   TRUE.
+   * @var \Drupal\Core\DependencyInjection\ContainerBuilder
    */
-  protected function initializeContainer($rebuild = TRUE) {
-    $container = parent::initializeContainer($rebuild);
-    return $container;
-  }
+  protected $containerBuilder;
+
+  /**
+   * Array of installed modules prior to updating module list.
+   *
+   * @var array
+   */
+  protected $oldModuleList;
+
+  /**
+   * Tracks whether initial service provider registration has run.
+   *
+   * @var bool
+   */
+  protected $initialServiceRegistration = FALSE;
+
+  /**
+   * Tracks whether the container needs to be dumped at the end of the request.
+   *
+   * @var bool
+   */
+  protected $dumpOnTerminate = FALSE;
+
+  /**
+   * Tracks where system module is installed.
+   *
+   * After system module is installed, the InstallerServiceProvider is removed
+   * and we can begin progressive container building.
+   *
+   * @see drupal_install_system().
+   *
+   * @var bool
+   */
+  protected $systemInstalled = FALSE;
 
   /**
    * Reset the bootstrap config storage.
@@ -40,4 +74,123 @@ public function resetConfigStorage() {
     $this->configStorage = NULL;
   }
 
+  /**
+   * {@inheritdoc}
+   */
+  protected function dumpDrupalContainer(ContainerBuilder $container, $base_class, $immediate = FALSE) {
+    // We don't dump the container until the request terminates.
+    if ($immediate === TRUE) {
+      return parent::dumpDrupalContainer($container, $base_class);
+    }
+    $this->dumpOnTerminate = TRUE;
+    return TRUE;
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function discoverServiceProviders() {
+    if (empty($this->serviceYamls) || !$this->systemInstalled) {
+      // Either this is the first time discovery has run, or system module is
+      // not yet installed, so we have to discover providers from scratch.
+      // Once system module is installed in drupal_install_system() we can
+      // progressively discover service providers as InstallerServiceProvider is
+      // no longer in use.
+      parent::discoverServiceProviders();
+      return;
+    }
+    $module_list = array_diff($this->moduleList, $this->oldModuleList);
+    $module_filenames = $this->getModuleFileNames($module_list);
+    $this->classLoaderAddMultiplePsr4($this->getModuleNamespacesPsr4($module_filenames));
+    $this->discoverModuleServiceProviders($module_filenames);
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  protected function getContainerBuilder() {
+    if (!$this->containerBuilder) {
+      $container_builder = new ContainerBuilder(new ParameterBag($this->getKernelParameters()));
+      if (!$this->systemInstalled) {
+        // We cannot statically cache the container-builder until such time as
+        // system module is installed and the registration/altering performed by
+        // InstallerServiceProvider is no at play.
+        // @see drupal_install_system().
+        return $container_builder;
+      }
+      $this->containerBuilder = $container_builder;
+    }
+    return $this->containerBuilder;
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function updateModules(array $module_list, array $module_filenames = array()) {
+    $this->oldModuleList = $this->moduleList;
+    parent::updateModules($module_list, $module_filenames);
+    $this->systemInstalled = $this->systemInstalled || in_array('system', $this->moduleList, TRUE);
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  protected function doRegisterServiceProviders($yaml_loader, $container) {
+    if (!$this->initialServiceRegistration || !$this->systemInstalled) {
+      // Initial registration will handle all existing service providers and any
+      // site specific ones. We cannot partially register service providers
+      // until system module is installed and the InstallerServiceProvider has
+      // been removed.
+      parent::doRegisterServiceProviders($yaml_loader, $container);
+      $this->initialServiceRegistration = TRUE;
+      return;
+    }
+    // Initial registration has occurred, so we only need to worry about
+    // registering newly installed modules.
+    $module_list = array_diff($this->moduleList, $this->oldModuleList);
+    foreach ($module_list as $module) {
+      if (!empty($this->serviceYamls['app'][$module])) {
+        $yaml_loader->load($this->serviceYamls['app'][$module]);
+      }
+      if (!empty($this->serviceProviders['app'][$module])) {
+        $provider = $this->serviceProviders['app'][$module];
+        if ($provider instanceof ServiceProviderInterface) {
+          $provider->register($container);
+        }
+      }
+    }
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function terminate(Request $request, Response $response) {
+    if ($this->dumpOnTerminate && $this->allowDumping) {
+      if ($this->container instanceof ContainerBuilder) {
+        $this->container->compile();
+      }
+      $this->dumpDrupalContainer($this->container, static::CONTAINER_BASE_CLASS, TRUE);
+    }
+    if (FALSE === $this->booted) {
+      return;
+    }
+
+    if ($this->getHttpKernel() instanceof TerminableInterface) {
+      $this->getHttpKernel()->terminate($request, $response);
+    }
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  protected function doCompile($container) {
+    if ($this->systemInstalled) {
+      // Once system module is installed and InstallerServiceProvider has been
+      // deactivated, we can progressively build the container.
+      $this->containerBuilder = $container;
+      return;
+    }
+    parent::doCompile($container);
+  }
+
 }
