Dockerize a Multisite Drupal Install for Drupal 7, Drupal 8, and Drupal 9

Last updated May 18, 2020

A multisite Drupal installation allows you to host multiple, separate web sites while relying on the same set of code. Large organizations often rely on a multisite installation to cut down on the operational upkeep of multiple sites. Hosting a multisite in Docker poses several additional challenges. Fortunately, the process is not dissimilar from configuring a bare-metal server to run a multisite.

In this tutorial, we'll:

  • Outline the additional requirements a multisite requires of Docker containers.
  • Configure alternate, local domain names to resolve each site in the install.
  • Learn how to configure a multisite to use alternate domain names.