I am using mssql server image in Azure Container Instance.
Without mounting any volumes, ACI is created successfully and works fine. But when I mount a volume, to persist data even after restart of the container, made of Azure Storage account (File share), ACI is created successfully but the database could not be accessed.
log and secrets folders are created in the File share (acishare) but the data is not generated in the File share.
Could anyone provide detailed steps to resolve it or to Create an ACI with File share as volume to the mssql server docker image.
[Azure bash commands to create ACI with a Azure file share volume mounted]
ACI_PERS_RESOURCE_GROUP=PC
ACI_PERS_STORAGE_ACCOUNT_NAME=pcs1
ACI_PERS_LOCATION=eastus
ACI_PERS_SHARE_NAME=acishare
STORAGE_KEY=$(az storage account keys list --resource-group $ACI_PERS_RESOURCE_GROUP --account-name $ACI_PERS_STORAGE_ACCOUNT_NAME --query "[0].value" --output tsv)
az container create \
--resource-group $ACI_PERS_RESOURCE_GROUP \
--name pcs5 \
--image mcr.microsoft.com/mssql/server \
--dns-name-label pcs5 \
--ports 80 443 1433 \
--azure-file-volume-account-name $ACI_PERS_STORAGE_ACCOUNT_NAME \
--azure-file-volume-account-key $STORAGE_KEY \
--azure-file-volume-share-name $ACI_PERS_SHARE_NAME \
--azure-file-volume-mount-path /var/opt/mssql/ \
--memory 2.5 \
--environment-variables 'SA_PASSWORD'='PxSecret123' 'ACCEPT_EULA'='Y' 'MSSQL_PID=Express'