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

Linux docker image won't start due to wrong start.sh location #107

Open marasva opened 2 months ago

marasva commented 2 months ago

Describe the bug It seems like the location of the start.sh-file has been moved recently to a bin folder?

We are running the linux docker image both locally and as a part of our dev-stage in Azure DevOps. Starting from Friday a new version of pulling the image from mcr.microsoft.com/cosmosdb/linux/azure-cosmos-emulator results in an error: /bin/bash: line 1: /usr/local/bin/cosmos/start.sh: No such file or directory

It seems like it is not possible to use other images than the latest and I also cannot seem to find the image here: https://mcr.microsoft.com/. I see that the latest version is 2.14.20, which I thought we used considering that no other version is available? How can it happen that the file location is suddenly moved?

This is how our Dockerfile looks like:

# Use the official CosmosDB emulator image 
FROM mcr.microsoft.com/cosmosdb/linux/azure-cosmos-emulator:latest

RUN apt-get update && apt-get install -y curl jq 

# Set environment variables for review environments, will be overriden in docker-compose
ENV AZURE_COSMOS_EMULATOR_PARTITION_COUNT=1
ENV AZURE_COSMOS_EMULATOR_ENABLE_DATA_PERSISTENCE=true
ENV AZURE_COSMOS_EMULATOR_IP_ADDRESS_OVERRIDE=127.0.0.1

# Expose necessary ports 
EXPOSE 8081 10251 10252 10253 10254 10255

# Command to start CosmosDB emulator
CMD ["/bin/bash", "-c", "/usr/local/bin/cosmos/start.sh"]

To Reproduce Steps to reproduce the behavior:

  1. Pull the latest image
  2. Run the Dockerfile
  3. See in Docker Desktop or some other logs that you get the error message above

Expected behavior The cosmos container running.

Desktop:

Docker Images Used

Docker Environment