docker.recipes

Azurite Azure Storage Emulator

beginner

Azure Blob, Queue, and Table storage emulator for local development.

Overview

Azurite is Microsoft's official open-source Azure Storage emulator that provides a cross-platform, lightweight solution for local development against Azure Blob, Queue, and Table storage services. Originally developed to replace the Windows-only Azure Storage Emulator, Azurite offers bit-for-bit compatibility with Azure Storage APIs, enabling developers to build and test cloud applications locally without incurring cloud storage costs or requiring internet connectivity. The emulator supports all major Azure Storage features including account authentication, container operations, blob metadata, and SAS tokens. This Docker stack combines Azurite with the Azure Storage Explorer ecosystem to create a complete local Azure Storage development environment. Azurite runs as a containerized service exposing separate endpoints for each storage type (Blob on port 10000, Queue on 10001, Table on 10002), while maintaining persistent data through Docker volumes. The configuration enables debug logging and binds all services to external interfaces, making the emulated storage accessible to applications running both inside and outside the Docker environment. This setup is essential for .NET developers, Python Azure SDK users, and cloud architects who need to develop Azure-dependent applications locally. By providing authentic Azure Storage behavior with known development account credentials, teams can implement complex storage workflows, test blob triggers for Azure Functions, and validate queue-based messaging patterns without Azure subscriptions. The persistent data volumes ensure that storage contents survive container restarts, making this suitable for extended development sessions and CI/CD pipelines.

Key Features

  • Complete Azure Storage API compatibility with Blob, Queue, and Table services
  • Persistent data storage with configurable location and automatic workspace restoration
  • Debug logging with detailed request/response tracking for troubleshooting
  • Support for Azure Storage SDK authentication using well-known development credentials
  • Cross-origin resource sharing (CORS) support for browser-based Azure applications
  • Metadata and custom properties support identical to Azure Storage behavior
  • SAS token generation and validation for secure access testing
  • Concurrent multi-service operation with independent endpoint management

Common Use Cases

  • 1Local development of Azure Functions with blob triggers and queue bindings
  • 2Testing .NET applications using Azure.Storage.Blobs SDK without cloud costs
  • 3CI/CD pipeline integration for automated testing of cloud storage workflows
  • 4Offline development of IoT applications that store telemetry in Azure Tables
  • 5Training environments for Azure certification courses and workshops
  • 6Prototyping data lake architectures before deploying to production Azure
  • 7Testing blob storage upload/download functionality in web applications

Prerequisites

  • Docker Engine 20.10+ with at least 512MB available memory for Azurite container
  • Ports 10000, 10001, and 10002 available and not used by other services
  • Azure Storage SDK or REST API knowledge for connecting client applications
  • Understanding of Azure Storage concepts like containers, queues, and tables
  • Azure Storage Explorer installed locally for GUI-based storage management
  • Familiarity with Azure Storage connection strings and account key authentication

For development & testing. Review security settings, change default credentials, and test thoroughly before production use. See Terms

docker-compose.yml

docker-compose.yml
1services:
2 azurite:
3 image: mcr.microsoft.com/azure-storage/azurite:latest
4 ports:
5 - "10000:10000" # Blob
6 - "10001:10001" # Queue
7 - "10002:10002" # Table
8 volumes:
9 - azurite_data:/data
10 command: azurite --blobHost 0.0.0.0 --queueHost 0.0.0.0 --tableHost 0.0.0.0 --location /data --debug /data/debug.log
11 networks:
12 - azure-net
13 restart: unless-stopped
14
15volumes:
16 azurite_data:
17
18networks:
19 azure-net:
20 driver: bridge

.env Template

.env
1# Azure Storage Connection String (for local development)
2AZURE_STORAGE_CONNECTION_STRING=DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://localhost:10000/devstoreaccount1;QueueEndpoint=http://localhost:10001/devstoreaccount1;TableEndpoint=http://localhost:10002/devstoreaccount1;

Usage Notes

  1. 1Blob Storage at http://localhost:10000
  2. 2Queue Storage at http://localhost:10001
  3. 3Table Storage at http://localhost:10002
  4. 4Use Azure Storage Explorer for GUI management

Quick Start

terminal
1# 1. Create the compose file
2cat > docker-compose.yml << 'EOF'
3services:
4 azurite:
5 image: mcr.microsoft.com/azure-storage/azurite:latest
6 ports:
7 - "10000:10000" # Blob
8 - "10001:10001" # Queue
9 - "10002:10002" # Table
10 volumes:
11 - azurite_data:/data
12 command: azurite --blobHost 0.0.0.0 --queueHost 0.0.0.0 --tableHost 0.0.0.0 --location /data --debug /data/debug.log
13 networks:
14 - azure-net
15 restart: unless-stopped
16
17volumes:
18 azurite_data:
19
20networks:
21 azure-net:
22 driver: bridge
23EOF
24
25# 2. Create the .env file
26cat > .env << 'EOF'
27# Azure Storage Connection String (for local development)
28AZURE_STORAGE_CONNECTION_STRING=DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://localhost:10000/devstoreaccount1;QueueEndpoint=http://localhost:10001/devstoreaccount1;TableEndpoint=http://localhost:10002/devstoreaccount1;
29EOF
30
31# 3. Start the services
32docker compose up -d
33
34# 4. View logs
35docker compose logs -f

One-Liner

Run this command to download and set up the recipe in one step:

terminal
1curl -fsSL https://docker.recipes/api/recipes/azurite-azure/run | bash

Troubleshooting

  • Error 'EADDRINUSE' on startup: Another service is using ports 10000-10002, stop conflicting services or change port mappings
  • Connection refused from host applications: Ensure azurite command includes --blobHost 0.0.0.0 binding for external access
  • Data lost after container restart: Verify azurite_data volume is properly mounted and --location /data parameter is set
  • Azure Storage Explorer cannot connect: Use connection string 'UseDevelopmentStorage=true;DevelopmentStorageProxyUri=http://localhost'
  • SDK authentication failures: Ensure client applications use the default development storage account name 'devstoreaccount1'
  • Slow performance with large blobs: Increase Docker memory allocation and consider mounting /data volume to SSD storage

Community Notes

Loading...
Loading notes...

Download Recipe Kit

Get all files in a ready-to-deploy package

Includes docker-compose.yml, .env template, README, and license

Ad Space