将目录映射到 cosmosDB 模拟器 Linux docker 映像以便数据(数据库)保留在主机文件系统上的正确路径是什么?
cosmosdb:
container_name: cosmosdb
image: mcr.microsoft.com/cosmosdb/linux/azure-cosmos-emulator:latest
mem_reservation: 3G
cpu_count: 2
tty: true
ports:
- "8081:8081"
- "8900:8900"
- "8901:8901"
- "8979:8979"
- "10250:10250"
- "10251:10251"
- "10252:10252"
- "10253:10253"
- "10254:10254"
- "10255:10255"
- "10256:10256"
- "10350:10350"
environment:
AZURE_COSMOS_EMULATOR_PARTITION_COUNT: 3
AZURE_COSMOS_EMULATOR_ENABLE_DATA_PERSISTENCE: true
AZURE_COSMOS_EMULATOR_IP_ADDRESS_OVERRIDE: 127.0.0.1
volumes:
- ???
Run Code Online (Sandbox Code Playgroud)
对于 Windows 来说似乎是
C:/CosmosDB.Emulator/bind-mount
Run Code Online (Sandbox Code Playgroud)
我已经查看了正在运行的图像,但我不知道存储在哪个目录数据库/数据文件中......
通常,文档相当短 https://learn.microsoft.com/en-us/azure/cosmos-db/linux-emulator?tabs=sql-api%2Cssl-netstd21
它只是说
If the Cosmos DB emulator data folder is "volume mounted", ensure that the volume has enough space and is read/write. …Run Code Online (Sandbox Code Playgroud)