6
votes

I am trying to build two different services which will be running on Azure Web Apps for Containers. I am creating docker images and storing it in Azure Container Registry. I want to share single persistent storage between these two services. I understood from blogs that you can mount /home directory but could not be shared between two services.

There is plugin for docker Cloudstor, I can create the volume but not sure how we can utilize this generated volume in Web Apps For Containers. The app service runs the command for docker, does anybody know how we can use the volume created using the plugin?

2

2 Answers

0
votes

In My Opinion the webapps for containers should not be there. I think it is better to get a docker host machine as vm and then work with normal docker features. this is also the way microsoft describes in their docs for multi-docker szenarios. https://docs.microsoft.com/de-de/azure/virtual-machines/linux/docker-compose-quickstart

Things that should microsoft do:

  • give kudo a proper docker cli

  • map storages to docker volumes via azure dashboard/azure cli

0
votes

Create a storage account and mount Fileshare into the docker image somewhere under /home

This will be easiest if the two service instances are in the same resource group as the storage account.

What is your reason for sharing a single storage instance?

Without experimenting I can't guarantee the same storage container can be shared between two app services. Depends on your needs. I expect two containers in the same storage account can be mounted into your two docker images.

Without knowing a little more this is the most I can contribute. All the best.