Reputation: 2055
I would like to prepare Microsoft container (required framework 4.6) with fileShare but I get error. Do you know what is wrong? and how do it this correct? The container image 'microsoft/aspnet' doesn't support specified OS 'Linux' for container group 'mmsappcalculation-1'.
rafal@Azure:~$ # Change these four parameters as needed
rafal@Azure:~$ ACI_PERS_RESOURCE_GROUP=mmsAppCalculationGroup
rafal@Azure:~$ ACI_PERS_STORAGE_ACCOUNT_NAME=fileshare8956
rafal@Azure:~$ STORAGE_KEY=2Ee56ua3I4gU7TgcI3IhAICXhgt+UG0xSL/kb9+PKEGl40T/5rHflEy8DMHwbaFqZL0oMfwzcjyAXDsQDg1Q==
rafal@Azure:~$ ACI_PERS_SHARE_NAME=acishare
rafal@Azure:~$
rafal@Azure:~$
rafal@Azure:~$ az container create \
> --resource-group $ACI_PERS_RESOURCE_GROUP \
> --image microsoft/aspnet \
> --name mmsappcalculation-1 \
> --dns-name-label mmsappcalculation \
> --ports 80 \
> --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 /app/sharedFile/
The container image 'microsoft/aspnet' doesn't support specified OS 'Linux' for container group 'mmsappcalculation-1'.
before I run this
# Change these four parameters as needed
ACI_PERS_RESOURCE_GROUP=mmsAppCalculationGroup
ACI_PERS_STORAGE_ACCOUNT_NAME=fileshare$RANDOM
ACI_PERS_LOCATION=eastus
ACI_PERS_SHARE_NAME=acishare
# Create the storage account with the parameters
az storage account create \
--resource-group $ACI_PERS_RESOURCE_GROUP \
--name $ACI_PERS_STORAGE_ACCOUNT_NAME \
--location $ACI_PERS_LOCATION \
--sku Standard_LRS
# Create the file share
az storage share create \
--name $ACI_PERS_SHARE_NAME \
--account-name $ACI_PERS_STORAGE_ACCOUNT_NAME
update I try also like this but still not work
https://learn.microsoft.com/en-us/cli/azure/container?view=azure-cli-latest
> --os-type Windows \
az: error: unrecognized arguments:
usage: az [-h] [--verbose] [--debug] [--only-show-errors]
[--output {json,jsonc,yaml,yamlc,table,tsv,none}] [--query JMESPATH]
{container} ...
rafal@Azure:~$ --cpu 2 \
> --memory 3.5 \
> --azure-file-volume-mount-path /app/sharedFile/
bash: --cpu: command not found
rafal@Azure:~$
Upvotes: 1
Views: 990
Reputation: 464
If you want to run .Net core you can use a Linux or Windows Container. If you want to run .Net Framework you need to use a Windows Container.
microsoft/aspnet uses .Net Framework so you must use a Windows Container to run it.
If you want to try this in Azure App Service, here is our quickstart on how to run a custom Windows container in Azure App Service: https://learn.microsoft.com/en-us/azure/app-service/app-service-web-get-started-windows-container
Upvotes: 2