This Docker image is a modern, feature-rich base for building and running DevExpress XAF Blazor applications on .NET 9. It includes all essential dependencies, broad Unicode and Windows-like font support, and is ready for use as a development or production base image.
- Based on
mcr.microsoft.com/dotnet/sdk:9.0(for build and dev; useaspnetfor runtime) - Preinstalled dependencies for DevExpress XAF Blazor and reporting (including
libgdiplus) - Extensive font support for Swedish, Finnish, Thai, and Windows compatibility (Arial, Times, Courier, Calibri, Cambria, etc.)
- Locale and timezone configuration via environment variables
- Ready for multi-language, multi-region, and reporting scenarios
FROM aelmen/xafblazoraspnet9
# ...your build and app steps...You can use a .env file to manage environment variables for locale, timezone, and secrets like your DevExpress NuGet API key:
See .env.example for a template:
LOCALE=fi_FI.UTF-8
TZ=Europe/Helsinki
DEVEXPRESS_NUGET_API_KEY=your_devexpress_api_key_hereExample docker-compose.example.yml:
version: '3.8'
services:
xafblazor:
image: aelmen/xafblazoraspnet9
env_file:
- .env
ports:
- "8080:80"
environment:
# Optionally override or add more environment variables here
# DEVEXPRESS_NUGET_API_KEY: ${DEVEXPRESS_NUGET_API_KEY}docker run -e LOCALE=th_TH.UTF-8 -e TZ=Asia/Bangkok -e DEVEXPRESS_NUGET_API_KEY=your_key your_image_nameYou can build a runtime image for your XAF Blazor app using this base. See Dockerfile.runtime.example and Dockerfile.runtime.full.example for templates.
Example snippet for DevExpress NuGet authentication:
ARG DEVEXPRESS_NUGET_API_KEY
RUN dotnet nuget add source https://nuget.devexpress.com/api -n devexpress-nuget --username=your_email --password=$DEVEXPRESS_NUGET_API_KEY --store-password-in-clear-textYou can pass the API key via .env, build args, or CI/CD secrets.
The image uses the LOCALE and TZ environment variables to set the system locale and timezone. You can override these at build or runtime. Examples:
LOCALE=sv_SE.UTF-8(Swedish)LOCALE=fi_FI.UTF-8(Finnish)LOCALE=th_TH.UTF-8(Thai)TZ=Europe/StockholmTZ=Europe/HelsinkiTZ=Asia/Bangkok
To see available locales, run locale -a inside a running container. For timezones, check /usr/share/zoneinfo.
For connection strings and other secrets, use environment variables in your .env or compose file:
ConnectionStrings__DefaultConnection=Server=host.docker.internal;Database=MyDb;User Id=sa;Password=your_password;You can build your own image on top of this base, adding your application and any extra dependencies you need:
FROM aelmen/xafblazoraspnet9
COPY . /app
WORKDIR /app
RUN dotnet publish YourApp.csproj -c Release -o /app/publish
CMD ["dotnet", "/app/publish/YourApp.dll"]Or use the full multi-stage example in Dockerfile.runtime.full.example for advanced scenarios.
This image includes:
software-properties-common,libc6,libicu-dev,libfontconfig1,tzdata,libgdiplus,locales- Fonts:
fonts-dejavu-core,fonts-dejavu-extra,fonts-thai-tlwg,fonts-freefont-ttf,fonts-noto-cjk,fonts-liberation,fonts-crosextra-carlito,fonts-crosextra-caladea,fonts-noto-mono
- Use a
.envfile for environment variables in development and CI/CD - For production, use the
aspnetruntime image and repeat the font andlibgdiplusinstallation steps - Always specify the correct
LOCALEandTZfor your application's users - Never commit secrets (like your DevExpress API key) to version control
This project is open for issues, pull requests, and suggestions! If you build something cool on top of this image, let us know or submit an example.
Maintained by aelmen. Contributions and suggestions welcome!
The image uses the LOCALE and TZ environment variables to set the system locale and timezone. You can override these at build or runtime. Examples:
LOCALE=sv_SE.UTF-8(Swedish)LOCALE=fi_FI.UTF-8(Finnish)LOCALE=th_TH.UTF-8(Thai)TZ=Europe/StockholmTZ=Europe/HelsinkiTZ=Asia/Bangkok
To see available locales, run locale -a inside a running container. For timezones, check /usr/share/zoneinfo.
You can build your own image on top of this base, adding your application and any extra dependencies you need:
FROM aelmen/xafblazoraspnet9
COPY . /app
WORKDIR /app
RUN dotnet publish YourApp.csproj -c Release -o /app/publish
CMD ["dotnet", "/app/publish/YourApp.dll"]This image includes:
software-properties-common,libc6,libicu-dev,libfontconfig1,tzdata,libgdiplus,locales- Fonts:
fonts-dejavu-core,fonts-dejavu-extra,fonts-thai-tlwg,fonts-freefont-ttf,fonts-noto-cjk,fonts-liberation,fonts-crosextra-carlito,fonts-crosextra-caladea,fonts-noto-mono
- Use a
.envfile for environment variables in development and CI/CD - For production, use the
aspnetruntime image and repeat the font andlibgdiplusinstallation steps - Always specify the correct
LOCALEandTZfor your application's users
Maintained by aelmen. Contributions and suggestions welcome!