Summary

When deploying a container and specifying an image to utilize you will soon realize that once the container restarts you lose all specific configuration details. This is due to the container being stateless and storing information temporarily instead of writing to a persistent volume.

What is ACI?

Azure Container Instances is a IaaS offering provided by Microsoft utilizing Azure. It allows for containers to be spun up without having to manage the underlying containerization software.

What is Azure Files?

Azure Files is a storage offering which utilizes SMB to enable containers to mount volumes and store container specific information such as configuration files and any other files utilized by the container image.

Deployment

When deploying a container using ACI a file format called YAML can be utilized. This enables containers to be easily deployed using a templating method. Below is the YAML template I used to deploy the container image for Ghost (what this blog is running on :D).


Deploy

Upload the deploy.yaml file by utilising the cloud shell via avaliable in the Azure portal.

2019-10-19_11-57

Run the below in either your Azure cloud shell instance or via remote Azure CLI.

Deploy container with YAML template
az container create --resource-group ghost --file deploy.yaml

Thanks!