'Driver options for Docker cloudstor azure plugin?
I'm quite new to docker plugins feature. I managed to build container for my django app with compose file.
version: '3.8'
services:
app:
build:
context: .
container_name: app
entrypoint: ./entrypoint.sh
ports:
- 8000:8000
volumes:
- mediafiles:/home/app/mypersonalsite/media/blog-pics
environment:
- POSTGRES_USER=user
- POSTGRES_PASSWORD=pass
- POSTGRES_DB=user
volumes:
mediafiles:
driver: cloudstor:azure
driver_opts:
share_name: media
storage_account_name: azurestoragename
I want to build container with external storage volume that wouldn't be hosted on azure but only connected to azure storage. I tried to connect with cloudstor azure plugin but can't get this to work althrought plugin is successfully installed and enabled on ubuntu 21.10 with this command:
docker plugin install --alias cloudstor:azure --grant-all-permissions docker4x/cloudstor:azure-v17.03.0-ce CLOUD_PLATFORM=AZURE AZURE_STORAGE_ACCOUNT_KEY="***" AZURE_STORAGE_ACCOUNT="***"
After trying to build compose file with azure volume options I'm getting error:
ERROR: create blog_mediafiles: VolumeDriver.Create: error validating metadata: not a recognized volume driver option: "share_name"
Can someone help or recommend any other plugin that is currently supported for azure or other network storage? Any help is appreciated.
Solution 1:[1]
would suugest you to use a different storage endpoint, such as core.cloudapi.de, you can specify it when you install the plugin:
docker plugin install --alias cloudstor:${STORAGE_ACCOUNT} --grant-all-permissions docker4x/cloudstor:18.06.1-ce-azure2 CLOUD_PLATFORM=AZURE AZURE_STORAGE_ACCOUNT_KEY="${STORAGE_KEY}" AZURE_STORAGE_ACCOUNT="${STORAGE_ACCOUNT}" AZURE_STORAGE_ENDPOINT="core.windows.net" DEBUG=1
By default, the Public Azure Storage endpoint is used.
Reference Docker for Azure persistent data volumes
Please refer this Thread which also help you to troubleshoot your problem.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 |
