【发布时间】:2022-06-10 23:20:16
【问题描述】:
我对 docker 插件功能很陌生。我设法使用撰写文件为我的 django 应用程序构建容器。
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
我想构建具有外部存储卷的容器,该存储卷不会托管在 Azure 上,但仅连接到 Azure 存储。我尝试连接 cloudtor azure 插件,但无法使其正常工作,尽管插件已在 ubuntu 21.10 上成功安装并使用以下命令启用:
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="***"
尝试使用 azure 卷选项构建 compose 文件后,出现错误:
ERROR: create blog_mediafiles: VolumeDriver.Create: error validating metadata: not a recognized volume driver option: "share_name"
有人可以帮助或推荐当前支持 azure 或其他网络存储的任何其他插件吗?任何帮助表示赞赏。
【问题讨论】:
标签: docker docker-compose azure-storage docker-volume persistent-volumes