我有一个 Azure 文件共享,我想将其用作在 Azure 容器应用程序内运行的 Neo4j 数据库的装载。每次我创建容器的配置时,它都会失败并出现错误“VolumeMountFailure”,并且没有其他信息来了解出了什么问题。下面是一些情况的截图:
容器的挂载设置:
系统日志中的错误是什么样的:
容器应用程序的 JSON 视图:
我也尝试过使用脚本和命令,但大多数时候它只是说好的,然后没有保存设置?保存设置时崩溃。
每次我创建容器的配置时,它都会失败,并显示错误“VolumeMountFailure”,并且没有其他信息来了解出了什么问题。
还有一种替代方法,只需考虑使用 Azure Blob 存储作为 Neo4j 数据库的持久存储。
准备Neo4j容器:
FROM neo4j:latest
# Set environment variables
ENV NEO4J_AUTH=neo4j/password
ENV NEO4J_dbms_directories_data=/data
# Expose Neo4j ports
EXPOSE 7474 7687
az container create \
--resource-group <resource_group_name> \
--name <container_name> \
--image skillseekercontainerregistry.azurecr.io/neo4j:latest \
--azure-blob-volume-account-name <storage_account_name> \
--azure-blob-volume-container-name <blob_container_name> \
--azure-blob-volume-account-key <storage_account_key> \
--azure-blob-volume-mount-path /data \
--cpu 1 \
--memory 2Gi \
--registry-login-server skillseekercontainerregistry.azurecr.io \
--registry-username <registry_username> \
--registry-password <registry_password>