Azure cosmos emulator inside gitpod always times out

CosmosDb emulator inside a gitpod container ends up having connection problems

  1. In a git pod container -
    docker run -p 8081:8081 -p 10251:10251 -p 10252:10252 -p 10253:10253 -p 10254:10254 -m 3g --cpus=2.0 --name=test-linux-emulator -e AZURE_COSMOS_EMULATOR_PARTITION_COUNT=3 -it

  2. Install cert with
    curl -k https://localhost:8081/_explorer/emulator.pem > /tmp/emulatorcert.crt sudo mv /tmp/emulatorcert.crt /usr/local/share/ca-certificates sudo update-ca-certificates

  3. Run tool:
    $ EQUINOX_COSMOS_CONNECTION="AccountEndpoint=https://localhost:8081;AccountKey=C2y6yDjf5/R+ob0N8A7Cgv30VRDJIWEHLM+4QDU5DE2nQ9nDuVTqobD4b8mGGyPMbIZnqyMsEcaGQy67XIw/Jw==;" EQUINOX_COSMOS_CONTAINER="common-test" EQUINOX_COSMOS_DATABASE="equinox-common-test" dotnet eqx init cosmos

04:41:06 I CosmosDB Primary Direct https://localhost:8081/ Database equinox-common-test Container common-test {} 04:41:06 I Provisioning Equinox.CosmosStore Store at Container level for 400 RU/s {} Response status code does not indicate success: RequestTimeout (408); Substatus: 0; ActivityId: 7c29836b-8167-4872-9027-a8e1bf9ad098; Reason: (GatewayStoreClient Request Timeout. Start Time UTC:12/7/2021 4:41:06 AM; Total Duration:16529.3186 Ms; Request Timeout 10000 Ms; Http Client Timeout:65000 Ms; Activity id: 7c29836b-8167-4872-9027-a8e1bf9ad098;);

Hi @raghu1! I’m not familiar with Azure Cosmos Emulator, but does the fact you’re referencing https://localhost:8081/ have anything to do with it? Does it need gp url to work?