Docker Desktop
We can deploy Data API Builder (DAB) using Docker Compose in Docker Desktop. An example compose file:
version: '3'
services:
DAB-AutoGen:
image: "mcr.microsoft.com/azure-databases/data-api-builder:latest"
container_name: DAB-AutoGen
ports:
- "5002:5000"
extra_hosts:
- "host.docker.internal:host-gateway"
volumes:
- c:\DataAPIBuilder\Samples\:/App/DAB-Configs
command: ["--ConfigFileName", "/App/DAB-Configs/dab-config-AutoGen.json"]
DAB-AutoGen2:
image: "mcr.microsoft.com/azure-databases/data-api-builder:latest"
container_name: DAB-AutoGen2
ports:
- "5003:5000"
extra_hosts:
- "host.docker.internal:host-gateway"
volumes:
- c:\DataAPIBuilder\Samples\dab-config-AutoGen.json:/App/dab-config.json
Azure Container Instance
We can also deploy the container in Azure Container Instance (ACI). The DAB configuration files need to be store in Azure File Share.
az container create
--resource-group rg_api \
--name dab-autogen \
--image mcr.microsoft.com/azure-databases/data-api-builder:latest \
--ip-address public \
--ports 5000 \
--cpu 1 \
--memory 2 \
--os-type Linux \
--azure-file-volume-account-name <your storage account name> \
--azure-file-volume-account-key <your storage account key> \
--azure-file-volume-share-name <your Azure file share name> \
--azure-file-volume-mount-path /DAB-Configs \
--command-line "dotnet Azure.DataApiBuilder.Service.dll --ConfigFileName /DAB-Configs/dab-config-AutoGen.json" \
--restart-policy never \
-o json
Docker Compose file for ACI. Pay attention to the difference with command parameters between compose file for ACI and Docker Desktop above.
version: '3'
services:
DAB_Test:
image: "mcr.microsoft.com/azure-databases/data-api-builder:latest"
container_name: DAB_Test
ports:
- "5001:5000"
volumes:
- configfilevolume:/App/DAB-Configs
command: "dotnet Azure.DataApiBuilder.Service.dll --ConfigFileName /DAB-Configs/dab-config.json"
DAB-AutoGen:
image: "mcr.microsoft.com/azure-databases/data-api-builder:latest"
container_name: DAB-AutoGen
ports:
- "5002:5000"
volumes:
- configfilevolume:/App/DAB-Configs
command: "dotnet Azure.DataApiBuilder.Service.dll --ConfigFileName /DAB-Configs/dab-config-AutoGen.json"
volumes:
configfilevolume:
driver: azure_file
driver_opts:
share_name: <file share name>
storage_account_name: <your storage account name>
storage_account_key: <your storage account key>
az container create --name testcontainers --resource-group rg_api --file compose_DAB_aci.yaml --restart-policy never --ip-address public --cpu 1 --memory 2
Proper filewall setting required on the SQL Server to allow incoming traffic from the Docker Container or ACI. UDP 1434 (for SQL Browser Service) or specific SQL TCP port numbers if browser service is not enabled.
If SQL instance is in Azure VM, the firewall needs to be configured on both the Azure network for the VM and the Windows firewall inside the VM.
Resources
Create a CRUD Web API in minutes with Data API Builder and EF Core Power ToolsFEATURED TAGS
ai
api
automation
availability
availability-sets
availability-zones
aws-vm
azure
azure-automation-runbook
azure-blob
azure-cosmos-db
azure-data-lake
azure-deployment
azure-function-app
azure-functions
azure-openai
azure-sign-in
azure-site-recovery
azure-sql-database
azure-subscription
azure-vm
base64
certificate
change-data-capture
change-tracking
chrome
clr
container
cte
data-api-builder
data-conversion
data-gateway
database-mail
database-role
database-size
date-table
dax
db-config
derived-table
diagram
direct-query
disk-management
disk-space
docker
downtime
dtc
dynamic-m-parameter
embedding
encrypted-connection
excel
excel-online
excel-online-for-business
execution-plan
extended-events
external-data
fabric
fabric-capacity
failover-cluster
fk
geometry
hierarchy
httpwebrequest
hugo
hyper-v
incognito-mode
index
infrastructure
inline-tvf
json
kql
lakehouse
linked-server
live-query-statistics
locking
m
machine-learning
machine-learning-model
machine-learning-services
master-key
mcp
mdx
memory
memory-grant
mermaid
mirrored-sql-server
network
network-card
network-category
office-script
onedrive
onnx-runtime
openrowset
p2v
parquet
performance
polybase
power-automate
power-bi
power-bi-report-tricks
power-platform
power-query
powershell
printer
public-ip-address
pyspark
python
qgis
qt-designer
query-performance
query-plan
query-troubleshooting
r
regex
replication
route
s3
schema-design
scripting
self-signed-certificate
server-role
sharepoint
snowflake
software-development
sofware-development
spark
sql
sql-2025
sql-agent
sql-availability-group
sql-error
sql-failover-cluster-instance
sql-index
sql-openjson
sql-permission
sql-recovery
sql-script
sql-security
sql-server
sql-server-admin
sql-server-config
sql-statistics
ssis
ssisdb
ssl
ssl/tls-error
ssms
table-expression
tempdb
terraform
tips
troubleshooting
unicode
view
visual-studio
visual-studio-code
vmware
wait-statistics
wi-fi-connection-issue
windows-settings