Problem
The current Docker image does not include a default configuration file, making it less user-friendly for those getting started.
Proposal
- Add a default configuration file named
dab-config.json to the Docker image.
- The file should be available in a standard location within the image, such as
/App/dab-config.json (see the Dockerfile below).
- The file should contain the following settings:
{
"$schema": "https://github.com/Azure/data-api-builder/releases/download/v1.7.86-rc/dab.draft.schema.json",
"data-source": {
"database-type": "mssql",
"connection-string": "@env('DAB_CONNSTRING')",
"options": {
"set-session-context": false
}
},
"runtime": {
"rest": {
"enabled": true,
"path": "/api",
"request-body-strict": false
},
"graphql": {
"enabled": true,
"path": "/graphql",
"allow-introspection": true
},
"mcp": {
"enabled": true,
"path": "/mcp"
},
"host": {
"cors": {
"origins": [],
"allow-credentials": false
},
"authentication": {
"provider": "Unauthenticated"
},
"mode": "development"
}
},
"entities": {},
"autoentities": {
"default": {
"template": {
"mcp": { "dml-tool": true },
"rest": { "enabled": true},
"graphql": { "enabled": true },
"health": { "enabled": true },
"cache": {
"enabled": false
}
},
"permissions": [
{
"role": "anonymous",
"actions": [
"*"
]
}
]
}
}
}
Benefit
Including this configuration file will provide immediate guidance for users, improve out-of-the-box experience, and make Docker-based experimentation much easier.
Relevant code locations
Dockerfile
The Docker image is defined by Dockerfile:
FROM mcr.microsoft.com/dotnet/sdk:8.0-cbl-mariner2.0. AS build
WORKDIR /src
COPY [".", "./"]
RUN dotnet build "./src/Service/Azure.DataApiBuilder.Service.csproj" -c Docker -o /out -r linux-x64
FROM mcr.microsoft.com/dotnet/aspnet:8.0-cbl-mariner2.0 AS runtime
COPY --from=build /out /App
WORKDIR /App
ENV ASPNETCORE_URLS=http://+:5000
ENTRYPOINT ["dotnet", "Azure.DataApiBuilder.Service.dll"]
To add the default config, include a line such as:
# Add default dab-config.json to /App in the image
COPY dab-config.json /App/dab-config.json
References in deployment scripts and samples
Please ensure the Docker image has this default config at /App/dab-config.json, and consider documenting override patterns for cloud and local deployments.
Problem
The current Docker image does not include a default configuration file, making it less user-friendly for those getting started.
Proposal
dab-config.jsonto the Docker image./App/dab-config.json(see the Dockerfile below).{ "$schema": "https://github.com/Azure/data-api-builder/releases/download/v1.7.86-rc/dab.draft.schema.json", "data-source": { "database-type": "mssql", "connection-string": "@env('DAB_CONNSTRING')", "options": { "set-session-context": false } }, "runtime": { "rest": { "enabled": true, "path": "/api", "request-body-strict": false }, "graphql": { "enabled": true, "path": "/graphql", "allow-introspection": true }, "mcp": { "enabled": true, "path": "/mcp" }, "host": { "cors": { "origins": [], "allow-credentials": false }, "authentication": { "provider": "Unauthenticated" }, "mode": "development" } }, "entities": {}, "autoentities": { "default": { "template": { "mcp": { "dml-tool": true }, "rest": { "enabled": true}, "graphql": { "enabled": true }, "health": { "enabled": true }, "cache": { "enabled": false } }, "permissions": [ { "role": "anonymous", "actions": [ "*" ] } ] } } }Benefit
Including this configuration file will provide immediate guidance for users, improve out-of-the-box experience, and make Docker-based experimentation much easier.
Relevant code locations
Dockerfile
The Docker image is defined by
Dockerfile:To add the default config, include a line such as:
References in deployment scripts and samples
samples/aspire/apphost.csbindsdab-config.jsoninto the container at/App/dab-config.json.samples/azure/bicep/dab-on-aca.bicepandsamples/azure/azure-container-apps-deploy.shreference mounting and passing
dab-config.json.dab-config.jsonand placed at/App/dab-config.jsonor a similar standard path.