All deployments of WordPress require an installation of PHP for running WordPress Core and associated extensions, along with a MySQL database for backing storage of your content and configurations. While configuration of these services is well documented, it can create confusion for the uninitiated and could impact the time required to stand up your site instance. With the advent of Docker, many Content Management Systems like WordPress can now be shipped with environmental dependencies and software prerequisites pre-configured, allowing you to create a new site instance rapidly that is completely isolated from the host environment.
Microsoft Azure offers the ability to deploy Azure Resource Manager (ARM) Templates that leverage Docker-Compose to stand up containerized applications in just a few clicks. Using Docker allows us to create an isolated user environment that fulfills the PHP + MySQL requirement and is portable across any VM for which the container’s source architecture matches the target. While Wordpress can run directly on an Azure VM or deployed as a standalone Azure App Service, a Docker container is portable across any host capable of running a Docker compatible OS. Due to this capability, you could lift and shift your containerized application between various cloud providers provided access to a host environment that is compatible with you containerized app.
If you already have a WordPress deployment and are interested in moving your instance to run in a container, you are in luck! Migrating an existing WordPress instance to an Azure VM running Docker can be done in five easy steps!
Here is exactly how I did it for my personal blog.