Giter Club home page Giter Club logo

docker-azurestorageemulator's Introduction

Azure Storage Emulator Docker Image

https://docs.microsoft.com/en-us/azure/storage/storage-use-emulator

Build status

Microsoft Docker hub verison

please use farmer1992/azure-storage-emulator instead of microsoft/azure-storage-emulator MS repo are moving to a new project https://github.com/Azure/Azurite. thus, the old .net version was freezed.

Usage

docker run -p 10000:10000 -p 10001:10001 -p 10002:10002 farmer1992/azure-storage-emulator

You may want C# code to generate connection string

Note: No need to modify the secret, it was hardcoded in container.

Raw string

DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://127.0.0.1:10000/devstoreaccount1;TableEndpoint=http://127.0.0.1:10002/devstoreaccount1;QueueEndpoint=http://127.0.0.1:10001/devstoreaccount1;

C#

static string GenerateConnStr(string ip = "127.0.0.1", int blobport = 10000, int queueport = 10001, int tableport = 10002)
{
    return $"DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://{ip}:{blobport}/devstoreaccount1;TableEndpoint=http://{ip}:{tableport}/devstoreaccount1;QueueEndpoint=http://{ip}:{queueport}/devstoreaccount1;";
}

Connect to emulator

var cloudStorageAccount = CloudStorageAccount.Parse(GenerateConnStr());

// ...

docker-azurestorageemulator's People

Contributors

flomader avatar megasware128 avatar tg123 avatar weng5e avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

docker-azurestorageemulator's Issues

Container exists with error code with nginx error

Hi,

I am running the following command to run storage emulator in a windows container.
docker run -p 10000:10000 -p 10001:10001 -p 10002:10002 farmer1992/azure-storage-emulator:latest

And i get the following error -
Windows Azure Storage Emulator 5.9.0.0 command line tool
The storage emulator was successfully started.
nginx: [emerg] unexpected end of parameter, expecting ";" in command line

It seems the image does not have the fix as proposed in another thread. Could you please upload the latest image with the fix?

Thanks.

Update microsoft/azure-storage-emulator just once more to fix the nginx error?

I know that Microsoft has moved towards azurite, but for those of us who need to use a Windows container (e.g., in a docker-compose setup with other Windows containers), it would be great if you could update microsoft/azure-storage-emulator (and synchronize it with farmer1992/azure-storage-emulator) just one more time to fix #3.

Why not just use farmer1992/azure-storage-emulator instead?

  • Because that's a private repository and we feel much more comfortable with using images from an official one.
  • Because whenever someone searches for the storage emulator on Github, they'll try the official one first and then go on a search for why it doesn't work.
  • Because it's just strange that there is an official image that's broken.

(If this is the wrong place to ask for this, please direct me to the right one of the different Azure Github projects where I should ask; thank you!)

Support windowsservercore-ltsc2019

Currently the emulator only uses ltsc2016 base image. I wish to run it on windows server 2019, but because of os compatibility issue, this is not possible. I cannot run ltsc2016 base image on windows server 2019.

Some ms projects support all windows image base and has the repo structure like this: https://github.com/microsoft/dotnet-framework-docker/tree/master/src/sdk/4.8

I am willing to create a PR, and it can be of similar structure in the link above.

If this is ok we also need to decide the docker image tags.

Container exits right away with error code 1

I attempted to run this image locally and haven't had any luck. It appears to be an issue with the command line to start nginx.

PS C:\WINDOWS> docker run -p 10000:10000 -p 10001:10001 -p 10002:10002 microsoft/azure-storage-emulator Windows Azure Storage Emulator 5.7.0.0 command line tool The storage emulator was successfully started. nginx: [emerg] unexpected end of parameter, expecting ";" in command line
PS C:\WINDOWS> docker ps -a CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES ce1a5cb3b608 microsoft/azure-storage-emulator "cmd /S /C C:\\entryp…" About a minute ago Exited (1) About a minute ago gallant_lalande

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.