Welcome toVigges Developer Community-Open, Learning,Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
4.2k views
in Technique[技术] by (71.8m points)

azure - Customized storage account for Azurite on docker compose

I am trying to use Azurite for my testing environment , I added it to the docker compose file , and it worked fine, code below :

azurite:
image: mcr.microsoft.com/azure-storage/azurite
container_name: test-azurite
ports:
  - '10001:10001'
  - '10000:10000'

I need to use a custom storage account name other than the default one "devstoreaccount1" , so I updated the account name on the different connection strings, and I added the account name as environment variable for the azurite container , now it looks like below :

azurite:
image: mcr.microsoft.com/azure-storage/azurite
container_name: test-azurite
ports:
  - '10001:10001'
  - '10000:10000'
environment:
  - AZURITE_ACCOUNTS="newstorageaccount:newkey"

I tried also adding it as command :

commands:
- export AZURITE_ACCOUNTS="newstorageaccount:newkey"

But that didn't work , any help on how to get Azurite to work with a customized storage account on docker compose is appreciated, Thanks


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神解答

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to Vigges Developer Community for programmer and developer-Open, Learning and Share
...