# Running Azure Cosmos DB Emulator docker image

**URL:** <https://travis-ci.community/t/running-azure-cosmos-db-emulator-docker-image/10577>\
**Category:** Windows\
**Tags:** docker\
**Created:** [November 15, 2020, 10:53am UTC](https://travis-ci.community/t/running-azure-cosmos-db-emulator-docker-image/10577 "2020-11-15T10:53:04Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![alexandru-slobodcico](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/alexandru-slobodcico/32/5560_2.png) [@alexandru-slobodcico](https://travis-ci.community/u/alexandru-slobodcico)\
**Post date:** [November 15, 2020, 10:53am UTC](https://travis-ci.community/t/running-azure-cosmos-db-emulator-docker-image/10577/1 "2020-11-15T10:53:04Z")

</div>

> **[Travis CI - Test and Deploy with Confidence](https://travis-ci.com/github/alexandru-slobodcicov/liquibase-cosmosdb/builds/201475840)**

using linux as unique option for Java  
getting:  
age operating system “windows” cannot be used on this platform.  
Any chance will have java on windows or will it be possible to run this for linux?

Docker instructions:

> **[Install and develop locally with Azure Cosmos DB emulator](https://docs.microsoft.com/en-us/azure/cosmos-db/local-emulator?tabs=powershell,ssl-netstd21#run-on-windows-docker)**
>
> Learn how to install and use the Azure Cosmos DB emulator on Windows, Linux, macOS, and Windows docker environments. Using the emulator you can develop and test your application locally for free, without creating an Azure subscription.

---

<div class="post-metadata">

**Author:** ![native-api](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/native-api/32/430_2.png) [@native-api](https://travis-ci.community/u/native-api)\
**Post date:** [November 15, 2020, 4:10pm UTC](https://travis-ci.community/t/running-azure-cosmos-db-emulator-docker-image/10577/2 "2020-11-15T16:10:33Z")

</div>

From [the instructions for Linux and MacOS in that article](https://docs.microsoft.com/ru-ru/azure/cosmos-db/local-emulator#use-the-emulator-on-linux-or-macos), it looks like the emulator itself only exists for Windows – it just can interact with another app running in Linux or MacOS over a network.

[Docker is available in the Windows build environment](https://travis-ci.community/t/docker-windows-containers-on-windows-the-operating-system-of-the-container-does-not-match-the-operating-system-of-the-host/427) but there’s no nested virtualization in it (last time I checked) so [the container’s kernel must match the VM’s kernel](https://docs.microsoft.com/en-us/virtualization/windowscontainers/deploy-containers/version-compatibility?tabs=windows-server-20H2%2Cwindows-10-20H2) – i.e. [Windows Server 1809](https://docs.travis-ci.com/user/reference/windows/#windows-version).

---

<div class="post-metadata">

**Author:** ![alexandru-slobodcico](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/alexandru-slobodcico/32/5560_2.png) [@alexandru-slobodcico](https://travis-ci.community/u/alexandru-slobodcico)\
**Post date:** [November 15, 2020, 5:02pm UTC](https://travis-ci.community/t/running-azure-cosmos-db-emulator-docker-image/10577/3 "2020-11-15T17:02:29Z")

</div>

So, from your response I have to use os: windows, however as I understand java is suported in linux only in Travis. Is this right?

---

<div class="post-metadata">

**Author:** ![native-api](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/native-api/32/430_2.png) [@native-api](https://travis-ci.community/u/native-api)\
**Post date:** [November 15, 2020, 7:00pm UTC](https://travis-ci.community/t/running-azure-cosmos-db-emulator-docker-image/10577/4 "2020-11-15T19:00:47Z")

</div>

Java is not preinstalled but you can install it yourself, e.g. via Chocolatey.

In any case, I’ve checked that the [CosmosDB emulator Docker image](https://hub.docker.com/r/microsoft/azure-cosmosdb-emulator) [has a different kernel than a Windows worker](https://travis-ci.com/github/native-api/test_travis/builds/201589129#L122) and [Hyper-V is still not available](https://travis-ci.com/github/native-api/test_travis/builds/201592690#L93).

So I can only refer you to a feature request,

> [@Hyper-V support in Windows](https://travis-ci.community/t/hyper-v-support-in-windows/2605):
>
> Please make it possible to to use hyper-v virtual machines in the Windows build environment. This will enable to run: Docker containers based on other versions of Windows note that the current (as of this writing) Server 1809 version is already missing from the table at [Windows Container Version Compatibility | Microsoft Docs](https://docs.microsoft.com/en-us/virtualization/windowscontainers/deploy-containers/version-compatibility). In particular, containes for newer technologies, e.g. [Azure Cosmos DB emulator](https://hub.docker.com/r/microsoft/azure-cosmosdb-emulator/tags), are not available for 1809 Linux containers via [Chocolatey Software | docker-machine…](https://chocolatey.org/packages/docker-machine)

---

<div class="post-metadata">

**Author:** ![alexandru-slobodcico](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/alexandru-slobodcico/32/5560_2.png) [@alexandru-slobodcico](https://travis-ci.community/u/alexandru-slobodcico)\
**Post date:** [November 18, 2020, 11:26am UTC](https://travis-ci.community/t/running-azure-cosmos-db-emulator-docker-image/10577/6 "2020-11-18T11:26:10Z")

</div>

Succeeded with a install java, install maven run tests flow:

> **[Travis CI - Test and Deploy with Confidence](https://travis-ci.com/github/alexandru-slobodcicov/liquibase-cosmosdb/jobs/442311536)**

Now got suppose what you mentioned:

> **[Travis CI - Test and Deploy with Confidence](https://travis-ci.com/github/alexandru-slobodcicov/liquibase-cosmosdb/jobs/442325412)**

Your build has been stopped.

148C:\Program Files\Docker\docker.exe: Error response from daemon: hcsshim::CreateComputeSystem e027ac34c3de6bb178260ea503ff3f2b9171dfcde99f4ada710ecf2100fd821f: The container operating system does not match the host operating system.
