diff --git a/samples/dotnetapp/dotnetapp.csproj b/samples/dotnetapp/dotnetapp.csproj index 80acd4831f..b889b2c08b 100644 --- a/samples/dotnetapp/dotnetapp.csproj +++ b/samples/dotnetapp/dotnetapp.csproj @@ -5,12 +5,12 @@ net10.0 enable enable - - - - true + linux-arm64;linux-x64 + linux-musl-arm64;linux-musl-x64 + + + + diff --git a/samples/globalapp/.dockerignore b/samples/globalapp/.dockerignore new file mode 100644 index 0000000000..aa573f5522 --- /dev/null +++ b/samples/globalapp/.dockerignore @@ -0,0 +1,55 @@ +# .NET build artifacts +bin/ +obj/ +out/ + +# Visual Studio / VS Code +.vs/ +.vscode/ +*.suo +*.user +*.userosscache +*.sln.docstates +*.swp +*.*~ +project.lock.json + +# NuGet +*.nupkg +*.snupkg +packages/ +.nuget/ + +# Test results +TestResults/ +[Tt]est[Rr]esult*/ +*.trx +*.coverage +*.coveragexml + +# Build logs +*.binlog +*.log + +# OS files +.DS_Store +Thumbs.db + +# Git +.git/ +.gitignore +.gitattributes + +# Docker +.dockerignore +Dockerfile* +docker-compose* + +# CI/CD +.github/ +.gitlab-ci.yml +azure-pipelines.yml + +# Documentation +*.md +LICENSE diff --git a/samples/globalapp/Dockerfile.aot-sdk-publish b/samples/globalapp/Dockerfile.aot-sdk-publish new file mode 100644 index 0000000000..dcfd8614ba --- /dev/null +++ b/samples/globalapp/Dockerfile.aot-sdk-publish @@ -0,0 +1,9 @@ +# This image allows easily building and publishing AOT-compiled .NET applications +# To use: +# * mount the Docker socket: `-v /var/run/docker.sock:/var/run/docker.sock` +# * mount the source code directory: `-v /path/to/source:/source` +# * call `dotnet publish -t PublishContainer` with/on a project that +# has been configured for AOT compilation +FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:10.0-noble-aot AS builder +ARG TARGETARCH +RUN curl -fsSL https://get.docker.com -o get-docker.sh && sh ./get-docker.sh \ No newline at end of file diff --git a/samples/globalapp/Dockerfile.aot-sdk-publish.alpine b/samples/globalapp/Dockerfile.aot-sdk-publish.alpine new file mode 100644 index 0000000000..a74c994f8a --- /dev/null +++ b/samples/globalapp/Dockerfile.aot-sdk-publish.alpine @@ -0,0 +1,8 @@ +# This image allows easily building and publishing AOT-compiled .NET applications +# To use: +# * mount the Docker socket: `-v /var/run/docker.sock:/var/run/docker.sock` +# * mount the source code directory: `-v /path/to/source:/source` +# * call `dotnet publish -t PublishContainer` with/on a project that +# has been configured for AOT compilation +FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:10.0-alpine-aot AS builder +RUN apk add --no-cache docker-cli \ No newline at end of file diff --git a/samples/globalapp/globalapp.csproj b/samples/globalapp/globalapp.csproj index 5882cd658f..cdf81cd6f2 100644 --- a/samples/globalapp/globalapp.csproj +++ b/samples/globalapp/globalapp.csproj @@ -5,9 +5,54 @@ net10.0 enable enable - true - true + linux-arm64;linux-x64 + linux-musl-arm64;linux-musl-x64 + + + + noble-chiseled + chiseled + + + + alpine + alpine + + + + noble + noble + + + + true + false + $(ContainerImageTag)-sc + true + + + + false + true true + $(ContainerImageTag)-trimmed + + + + true + $(ContainerImageTag)-aot + + $(ContainerImageTag)-invariant + + + + $(ContainerImageTag)-variant + $(ContainerFamily)-extra + + + + +