mirror of https://github.com/docker/docs.git
Merge pull request #11314 from gtardif/aci_volumes_doc
Documentation on ACI volume support
This commit is contained in:
commit
4e330a39df
|
@ -151,6 +151,42 @@ You can also deploy and manage multi-container applications defined in Compose f
|
|||
>
|
||||
> The current Docker Azure integration does not allow fetching a combined log stream from all the containers that make up the Compose application.
|
||||
|
||||
## Using Azure file share as volumes in ACI containers
|
||||
|
||||
You can deploy containers or Compose applications that use persistent data
|
||||
stored in volumes. Azure File Share can be used to support volumes for ACI
|
||||
containers.
|
||||
|
||||
With an existing Azure File Share, with storage account name `mystorageaccount`
|
||||
and file share name `myfileshare`, you can specify a volume in your deployment `run`
|
||||
command as follows:
|
||||
|
||||
`docker run -v storageaccount@fileshare:/target/path myimage` and the runtime
|
||||
container will see the file share content in `/target/path`.
|
||||
|
||||
In a Compose application, the volume specification must use the following syntax
|
||||
in the Compose file:
|
||||
|
||||
```yaml
|
||||
myservice:
|
||||
image: nginx
|
||||
volumes:
|
||||
- mydata:/mount/testvolumes
|
||||
|
||||
volumes:
|
||||
mydata:
|
||||
driver: azure_file
|
||||
driver_opts:
|
||||
share_name: myfileshare
|
||||
storage_account_name: mystorageaccount
|
||||
```
|
||||
|
||||
Now, you need to create an Azure storage account and File Share using the Azure
|
||||
portal, or the `az` [command line](https://docs.microsoft.com/en-us/azure/storage/files/storage-how-to-use-files-cli).
|
||||
|
||||
When you deploy a single container or a Compose application, your
|
||||
Azure login will automatically fetch the key to the Azure storage account.
|
||||
|
||||
## Using ACI resource groups as namespaces
|
||||
|
||||
You can create several Docker contexts associated with ACI. Each context must be associated with a unique Azure resource group. This allows you to use Docker contexts as namespaces. You can switch between namespaces using `docker context use <CONTEXT>`.
|
||||
|
|
Loading…
Reference in New Issue