Builds a docker image that allows containerised builds of .NET 11.0 MAUI Android 37.2 apps.
The goal of the resulting image is that you can run dotnet build on a MAUI Android workspace without first needing to install additional software.
- Start the docker image. It's recommended to do so from a .NET major.minor version tag, (e.g.
:11.0) and notlatest. - Get the source code you want to build
dotnet build
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build
shell: bash
run: dotnet build
- name: Upload AAB
uses: actions/upload-artifact@v4
with:
name: aab
path: bin/Release/net11.0-android/com.example.app-Signed.aab
if-no-files-found: error
retention-days: 1There are two possible approaches:
- Sort of copy your current development machine configuration into a docker image
- Create a docker image based on a specifically configured set of versions that is not present on your local system
If your current machine is set-up to build .NET MAUI Android apps, and you want a docker image with similar capabilities:
-
Clone this repo
-
Create a .env file where you set:
MAINTAINER="Your (company) name" DOCKER_HUB_USERNAME=your-dockerhub-username
-
Run
./build.sh -
Test the image
-
Run
./build.sh -pto push the image to your docker hub. It will be tagged withlatest, the exact .NET SDK Version and the overarching .NET SDK major.minor version.
-
Clone this repo
-
Create a .env file where you set the versions you want:
MAINTAINER="Your (company) name" DOCKER_HUB_USERNAME=your-dockerhub-username # Change the versions below to whatever you want. SDK_VERSION=11.0.100 ANDROID_API=37.2 BUILD_TOOLS_VERSION=37.0.0 # Optional: This is the default. JDK 21 is also supported. # JAVA_VERSION=25
-
Run
./build.sh -
Test the image
-
Run
./build.sh -pto push the image to your docker hub. It will be tagged withlatest, the exact .NET SDK Version and the overarching .NET SDK major.minor version.