Azure / azure-cosmos-db-emulator-docker

This repo serves as hub for managing issues, gathering feedback, and having discussions regarding the Cosmos DB Emulator Docker.
https://learn.microsoft.com/en-us/azure/cosmos-db/how-to-develop-emulator?tabs=docker-linux%2Ccsharp&pivots=api-nosql
MIT License
165 stars 47 forks source link

Have problem when try to start emulator i docker compose #27

Closed L0ndra closed 5 years ago

L0ndra commented 5 years ago

Use that configuration in docker compose

cosmos:
    image: "microsoft/azure-cosmosdb-emulator"
    mem_limit: 2G
    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"
    networks:
      net:
        ipv4_address: 10.5.0.3
    volumes:
      - C:\Users\Illia_Lubenets\AppData\Local\CosmosDBEmulator\bind-mount:C:\CosmosDB.Emulator\bind-mount

and receive that error

cosmos_1   | Exception setting "BufferWidth": "The handle is invalid.
cosmos_1   | "
cosmos_1   | At C:\CosmosDB.Emulator\Start.ps1:37 char:1
cosmos_1   | + [Console]::BufferWidth = 32766
cosmos_1   | + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cosmos_1   |     + CategoryInfo          : NotSpecified: (:) [], SetValueInvocationExceptio 
cosmos_1   |    n
cosmos_1   |     + FullyQualifiedErrorId : ExceptionWhenSetting
cosmos_1   |  
cosmos_1   | Transcript started, output file is C:\CosmosDB.Emulator\bind-mount\Diagnostics\Transcript.log
L0ndra commented 5 years ago

I have solved this problem.

All that I need it's to rebuild image instead of the image that uploaded to docker hub

joshystuart commented 4 years ago

@L0ndra what version of windows server did you use as the Dockerfile doesn't specify and Windows has dropped the :latest tag.

maarten-kieft commented 3 years ago

I ran in the same problem. I resolved it by adding tty:true to the docker-compose file. So the file will look like this:

cosmos:
    image: "microsoft/azure-cosmosdb-emulator"
    mem_limit: 2G
    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"
    networks:
      net:
        ipv4_address: 10.5.0.3
    volumes:
      - C:\Users\Illia_Lubenets\AppData\Local\CosmosDBEmulator\bind-mount:C:\CosmosDB.Emulator\bind-mount

Mine does actually resolve latest...