Docker-AzureStorageEmulator:AzureStorageEmulator的Docker映像

  • l7_910488
    了解作者
  • 3.7KB
    文件大小
  • zip
    文件格式
  • 0
    收藏次数
  • VIP专享
    资源类型
  • 0
    下载次数
  • 2022-05-09 04:08
    上传日期
Docker-AzureStorageEmulator:AzureStorageEmulator的Docker映像
Docker-AzureStorageEmulator-master.zip
  • Docker-AzureStorageEmulator-master
  • Dockerfile
    2.5KB
  • LICENSE
    1KB
  • entrypoint.cmd
    56B
  • README.md
    1.7KB
  • nginx.conf
    789B
内容介绍
# Azure Storage Emulator Docker Image <https://docs.microsoft.com/en-us/azure/storage/storage-use-emulator> [![Build status](https://dev.azure.com/farmer1992/opensources/_apis/build/status/DockerBuild-AzureStorageEmulator)](https://dev.azure.com/farmer1992/opensources/_build/latest?definitionId=9) ## 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()); // ... ```
评论
    相关推荐