3

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

Matheus Xavier
  • 397
  • 2
  • 11

1 Answers1

1

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.

Chris Anderson
  • 8,305
  • 2
  • 29
  • 37
  • 1
    Hello @Chris the problem it's that **Azure Cosmos Emulator Docker Container** does not work on Linux containers, so whether I'm using a simple Cosmos Db instance I can use a Mongo image, but this is not possible when using **Table APIs** – Matheus Xavier May 12 '20 at 21:31
  • That's correct. Currently Cosmos DB relies on some pretty deep Windows APIs that aren't easy to abstract away (we've tried haha) in the emulator. We might try and approach like [Azurite](https://github.com/Azure/Azurite) has done for Storage, in the future, but in the mean time, you're probably stuck using a cloud hosted instance. The Cosmos DB Free Tier was created with that in mind. – Chris Anderson May 13 '20 at 21:16
  • Thanks again @Chris, I've read about this solution, of using the **Cosmos DB Free Tier** and this can solve my problem, but on Azure Account I have other Cosmos Db Accounts and when I try to create a new one for development purpose it isn't free – Matheus Xavier May 13 '20 at 23:17
  • Yeah, understand it is not perfect. We're working on more stuff that will hopefully help. – Chris Anderson May 14 '20 at 04:47