azure-cosmos-db-emulator-docker icon indicating copy to clipboard operation
azure-cosmos-db-emulator-docker copied to clipboard

Multi Stage Build into Nano server

Open JaapSingh opened this issue 4 years ago • 0 comments

In order to keep image size small, I was hoping to create a multi-build Dockerfile, where I install cosmosDB Emulator into the servercore base image (using the msi), and copy the installation to a nano server image, where I can then spin up the emulator (since nano server does not support msi):

`FROM mcr.microsoft.com/windows/servercore:ltsc2019 AS dependencies RUN Invoke-WebRequest -Uri https://aka.ms/cosmosdb-emulator -OutFile .\cosmosdb.msi; Start-Process msiexec.exe -Wait -ArgumentList '/I cosmosdb.msi /quiet'; rm .\cosmosdb.msi

FROM mcr.microsoft.com/dotnet/core/sdk as base ARG cosmosDBPath="c:/Program Files/Azure Cosmos DB Emulator" COPY --from=dependencies ${cosmosDBPath} ${cosmosDBPath} And then within the script that is executed, have something to this effect:Start-Process -FilePath "C:\Program Files\Azure Cosmos DB Emulator\CosmosDB.Emulator.exe" -ArgumentList "/noui"`

However, this is working, and I see "No connection could be made because the target machine actively refused it." whenever I try to connect to "https://127.0.0.1:8081/_explorer/index.html".

Are there any suggestions for how I can get CosmosDB Emulator to work within a nano-server container?

JaapSingh avatar Nov 16 '20 21:11 JaapSingh