Running the cosmos emulator in docker (Wsl2) and finding that data is not persisted between container runs. I am able to seed the database but don't see data persist between container runs.
docker run \
--publish 8081:8081 \
--publish 10251-10254:10251-10254 \
--memory 3g --cpus=2.0 \
--name=test-linux-emulator \
--env AZURE_COSMOS_EMULATOR_PARTITION_COUNT=10 \
--env AZURE_COSMOS_EMULATOR_ENABLE_DATA_PERSISTENCE=true \
--env AZURE_COSMOS_EMULATOR_IP_ADDRESS_OVERRIDE=$ipaddr \
--interactive \
--tty \
mcr.microsoft.com/cosmosdb/linux/azure-cosmos-emulator
Based off the documentation, the data should persist between runs.
AZURE_COSMOS_EMULATOR_ENABLE_DATA_PERSISTENCE false This setting used by itself will help persist the data between container restarts.