sha256:3783c720ab304d3857219a5291dfb9d3001a9b44eae69f4c7d775541201020fd
Last pushed
about 1 hour by sbx
Type
Sandbox Kit
Manifest digest
sha256:3783c720ab304d3857219a5291dfb9d3001a9b44eae69f4c7d775541201020fd
schemaVersion: "3"
displayName: Azure Cosmos DB emulator
description: Runs the Azure Cosmos DB emulator (vNext, API for NoSQL) on the sandbox's Docker Engine, with the gateway on localhost:8081 and Data Explorer on port 1234, and publishes both on the host's loopback. Requires a Docker-in-Docker base.
sourceUrl: https://github.com/Azure/azure-cosmos-db-emulator-docker
iconUrl: https://github.com/AzureCosmosDB.png
version: 0.1.0
kind: mixin
provides:
- cosmos-db-emulator
requires:
- deb/curl
- deb/docker-ce
capabilities:
- type: com.docker.sandbox/port@1
config:
container: 8081
name: cosmos-gateway
- type: com.docker.sandbox/port@1
config:
container: 1234
name: cosmos-explorer
- type: com.docker.sandbox/network-policy@1
config:
runtime:
allow:
- mcr.microsoft.com
- '*.data.mcr.microsoft.com'
- type: com.docker.sandbox/lifecycle@1
config:
startup:
- command:
- sh
- -c
- 'command -v docker >/dev/null 2>&1 || { echo ''cosmos-db-emulator: docker not found; compose this kit onto a Docker-in-Docker base such as docker.io/sbx/shell'' >&2; exit 1; }'
description: Fail fast when the base has no Docker Engine
user: "0"
- background: true
command:
- sh
- -c
- exec /usr/local/bin/cosmos-emulator boot >> /var/log/cosmos-db-emulator.log 2>&1
description: Start the Cosmos DB emulator on the sandbox's Docker Engine
env:
- DOCKER_HOST
- COSMOS_EMULATOR_PROTOCOL
- COSMOS_EMULATOR_IMAGE_TAG
user: "0"
- type: com.docker.sandbox/agent-context@1
config:
contentFile: /usr/share/sandbox/kit/cosmos-db-emulator/cosmos-db-emulator-context.md
args:
imageTag:
default: vnext-latest
description: Emulator image tag; pin a dated vnext-EN<yyyymmdd> tag for repeatable runs
pattern: ^vnext-[A-Za-z0-9._-]+$
env: COSMOS_EMULATOR_IMAGE_TAG
protocol:
default: http
description: Gateway protocol; the .NET and Java SDKs need https. Data Explorer stays on http
enum:
- http
- https
env: COSMOS_EMULATOR_PROTOCOL