Skip to main content

Configuring State Storage via Azurite

Azurite is an emulator for azure storage.

The easiest way to use it is to install the Azurite docker image and add it to docker compose:

  • Install Azurite docker image:

    • Open a command prompt and navigate to dev/azurite/dockerfile
    • Build and tag the image by running the following command:
      docker build -t windows-azurite .
  • Configure dapr to use azurite, by copying dev/dapr/alt-components/azurite-state.yml to dev/dapr/components

    • The accountName and accountKey in the configuration are the well-known default values for azurite. See the azurite documentation for more info
  • Add the azurite image to the services section of the docker-compose.yml file

    azurite:
    image: windows-azurite:latest
    ports:
    - "10000:10000" # Blob service
    - "10001:10001" # Queue service
    - "10002:10002" # Table service
    networks:
    - dcc
    volumes:
    - ../../DockerPersistence/Azurite:c:\azurite\persistence
  • Set the BinaryStorage environment variable to point dapr to the azurite component: BinaryStorage=azurite-state