I am trying to run an image on ACI, whenever it is trying to pull image as this
pulling image "mysql@sha256:asakjvnankvaknaklfvkabjaoenla"
the container is failing, whereas in command i have given image as mysql:latest
.
az container create \
--resource-group $ACI_PERS_RESOURCE_GROUP \
--name xxxxxxx \
--location eastus \
--image mysql:latest \
--dns-name-label xxxxxxxx \
--environment-variables MYSQL_ROOT_PASSWORD=password@123 \
--ports 3306 33060 \
--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_NAME2 \
--azure-file-volume-mount-path /var/lib/mysql
The issue is when it try to pull image as mysql@sha256:asakjvnankvaknaklfvkabjaoenla, the continer fails to start while if the image pulled is pulling image "mysql:latest" than container works.
Attaching the pic for refrenece.
Not sure why this issue is happening
Command to run three containers
ACI_PERS_RESOURCE_GROUP=myresourcegroup
ACI_PERS_STORAGE_ACCOUNT_NAME=mydatabasest2501
ACI_PERS_LOCATION=eastus
ACI_PERS_SHARE_NAME=mysqlshare1
ACI_PERS_SHARE_NAME2=mysqlshare2
ACI_PERS_SHARE_NAME3=mysqlshare3
#I already have storage account so only creating fileshare
# Create the file share
az storage share create \
--name $ACI_PERS_SHARE_NAME \
--account-name $ACI_PERS_STORAGE_ACCOUNT_NAME
# Create the file share
az storage share create \
--name $ACI_PERS_SHARE_NAME2 \
--account-name $ACI_PERS_STORAGE_ACCOUNT_NAME
# Create the file share
az storage share create \
--name $ACI_PERS_SHARE_NAME3 \
--account-name $ACI_PERS_STORAGE_ACCOUNT_NAME
echo $ACI_PERS_STORAGE_ACCOUNT_NAME
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)
echo $STORAGE_KEY
az container create \
--resource-group $ACI_PERS_RESOURCE_GROUP \
--name contaier1 \
--location eastus \
--image mysql:latest \
--dns-name-label uniqueddns1 \
--environment-variables MYSQL_ROOT_PASSWORD=password@123 \
--ports 3306 33060 \
--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/lib/mysql
az container create \
--resource-group $ACI_PERS_RESOURCE_GROUP \
--name contaier2 \
--location eastus \
--image mysql:latest \
--dns-name-label uniqueddns2 \
--environment-variables MYSQL_ROOT_PASSWORD=password@123 \
--ports 3306 33060 \
--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_NAME2 \
--azure-file-volume-mount-path /var/lib/mysql
az container create \
--resource-group $ACI_PERS_RESOURCE_GROUP \
--name contaier3 \
--location eastus \
--image mysql:latest \
--dns-name-label uniqueddns3 \
--environment-variables MYSQL_ROOT_PASSWORD=password@123 \
--ports 3306 33060 \
--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_NAME3 \
--azure-file-volume-mount-path /var/lib/mysql
container@shah256:...
) vs the image tag (container:0.0.5
). no idea why this occurs or why the container gets killed. fyi I have no file shares, and my container is in the ACR. I think maybe some sort of weird caching going on behind the scenes by ACI when the same image is pulled – riptusk331