Search code examples
dockerdocker-composeazure-cosmosdbazure-cosmosdb-tables

Is it possible to run Comos DB inside docker-compose with Table API option


Azure Cosmos DB has an option called Table API, I'm using it and I really enjoy, but the problem it is that I need to run my environment on docker-compose and I don't know if it's possible. When we are developing, we can use the Azure Comos DB Emulator e run a command Microsoft.Azure.Cosmos.Emulator.exe /EnableTableEndpoint that enable us to developing locally using the Table API but we don't have this options when running on docker-compose


Solution

  • In the docker container, this can be done via the environment variable approach.

    Set AZURE_COSMOS_EMULATOR_TABLES_ENDPOINT=true in your docker-compose file for the emulator, and it should start with Tables API working.