How to Containerize Drupal CMS with Docker and Deploy Using Terraform on Azure
- Source: Containerizing Drupal CMS by ttrelvik (August 24, 2025)
In this technical write-up, ttrelvik details the process of creating a Docker image for Drupal CMS, addressing the absence of an official distribution image. Unlike Drupal Core's readily available image, Drupal CMS-pre-packaged with SEO, workflows, and media management features-required a custom approach.
The solution was a multi-stage Docker build: a builder stage using Composer to generate a fresh Drupal CMS project (plus extras like Drush or Samlauth), and a final stage combining PHP-FPM with Nginx for production use. This reproducible process ensures consistency in CI/CD pipelines and eliminates manual setup dependencies. The image can be pushed directly to a container registry for deployment.
Deployment was tested with Terraform on Azure Container Apps, requiring only minor path adjustments from earlier Core-based workflows. The result is a portable, automated, GitOps-ready pipeline for Drupal CMS deployments.
? Source code reference: drupal-cms-docker GitHub repo
