Skip to content

Better MAUI Windows Docker Image #22230

Answered by Steve0212a
asi-evin asked this question in Q&A
Discussion options

You must be logged in to vote

This one comes in at 11.9 GB and works to build my .Net 8 Android Maui project.

FROM mcr.microsoft.com/dotnet/sdk:8.0-windowsservercore-ltsc2019

# $ProgressPreference: https://github.com/PowerShell/PowerShell/issues/2138#issuecomment-251261324
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]

# MAUI
RUN dotnet nuget locals all --clear; \
	dotnet workload install maui;

# JAVA
ENV JAVA_HOME C:\\openjdk-17
RUN $newPath = ('{0}\bin;{1}' -f $env:JAVA_HOME, $env:PATH); \
	Write-Host ('Updating PATH: {0}' -f $newPath); \
	setx /M PATH $newPath; \
	Write-Host 'Complete.'
ENV JAVA_URL=https://download.java.net/java/GA/jdk17.0.2/dfd4a8…

Replies: 3 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@asi-evin
Comment options

Comment options

You must be logged in to vote
1 reply
@asi-evin
Comment options

Answer selected by asi-evin
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants