Skip to content

Latest commit

 

History

History
62 lines (40 loc) · 2.78 KB

specific_container_image.md

File metadata and controls

62 lines (40 loc) · 2.78 KB

Overview

This article provides steps for using a specific container image for WordPress to support custom configurations.

Note: Using a specific image tag is not recommended, as it disables automatic platform updates for your WordPress image. We suggest allowing the platform to manage image updates for better maintenance, as outlined in the Choosing the Right Image section.

However, you may need to use a specific container image in cases like:

  • Customizing the Docker image beyond the built-in startup script capabilities provided.
  • Addressing a unique issue with your site by using an older or newer platform-provided image to mitigate specific edge-case scenarios.
  • Comparing behavior between versions to troubleshoot site-specific issues and improve issue isolation.

Platform-Supported Images

To view available WordPress Docker image tags, click here.

Prerequisites

  • Azure CLI: Ensure Azure CLI is installed and configured.

    az upgrade
    az extension add --name webapp --upgrade --allow-preview true

Updating the WebApp LinuxFxVersion

For Linux

az account set -s $SUBSCRIPTION
az webapp config set --resource-group <wordpress-app-resource-group-name> --name <wordpress-app-service-name> --linux-fx-version "DOCKER|mcr.microsoft.com/appsvc/wordpress-debian-php:8.3_20241025.3.tuxprod"

For Windows (Using PowerShell)

az account set -s $SUBSCRIPTION
az --% webapp config set --resource-group <wordpress-app-resource-group-name> --name <wordpress-app-service-name> --linux-fx-version "DOCKER|mcr.microsoft.com/appsvc/wordpress-debian-php:8.3_20241025.3.tuxprod"

The --% operator in PowerShell prevents special characters like | from being interpreted, so the command passes directly to Azure CLI.

To check your subscription ID if needed:

az account list --output table

Optional: Change Docker Container Registry Server URL

Caution: Changing the default registry server is not recommended, as it will affect WordPress support by us.

By default, the container registry server is set to Microsoft Container Registry, so no changes are needed for platform-specific images.

URL Registry Hub
Public Docker Hub https://index.docker.io/v1
Public Microsoft Container Registry (Recommended) https://mcr.microsoft.com

Update the DOCKER_REGISTRY_SERVER_URL Environment variable of site as shown in screenshot below