This is an automated email from the ASF dual-hosted git repository. FreeAndNil pushed a commit to branch Feature/305-dotnet-10-build-cleanup in repository https://gitbox.apache.org/repos/asf/logging-log4net.git
commit 7fc8f26a04b4d8cc8eca134b207248984b1cff85 Author: Jan Friedrich <[email protected]> AuthorDate: Tue Aug 4 23:33:28 2026 +0200 Build the container image from the .NET 10 SDK image Replace ubuntu:20.04 + dotnet-install.sh with mcr.microsoft.com/dotnet/sdk:10.0-noble - Ubuntu 24.04 with the SDK preinstalled. Drops the Mono packages, the apt-key/stable-focal repo, wget, tree and the DOTNET_ROOT/PATH handling, leaving no apt layer at all. Ubuntu 20.04 left standard support in April 2025. --- Dockerfile | 33 ++++++++-------------------- src/changelog/3.4.0/305-docker-sdk-image.xml | 13 +++++++++++ 2 files changed, 22 insertions(+), 24 deletions(-) diff --git a/Dockerfile b/Dockerfile index f39c387b..5e706010 100644 --- a/Dockerfile +++ b/Dockerfile @@ -16,34 +16,19 @@ # MAINTAINER Jan Friedrich -FROM ubuntu:20.04 -ENV DEBIAN_FRONTEND=noninteractive \ - TZ=Etc/UTC +# Ubuntu 24.04 (noble) with the .NET 10 SDK already installed - noble is the only Ubuntu +# variant published for .NET 10. The reference is fully qualified, so it needs no registry +# configuration and no login, unlike the short name it replaces. +FROM mcr.microsoft.com/dotnet/sdk:10.0-noble +ENV TZ=Etc/UTC -# Install Mono SDK (compiler, msbuild, runtime, etc.) -RUN apt-get update && \ - apt-get install -y gnupg ca-certificates && \ - apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF && \ - echo "deb https://download.mono-project.com/repo/ubuntu stable-focal main" | tee /etc/apt/sources.list.d/mono-official-stable.list && \ - apt-get update && \ - apt-get install -y mono-complete && \ - rm -rf /var/lib/apt/lists/* +# Mono is not required: the net4x targets are compiled against the +# Microsoft.NETFramework.ReferenceAssemblies packages that the .NET SDK references implicitly. +# Mono would only be needed to *execute* net4x assemblies, which this image does not do. -# Check Mono version -RUN mono --version - -RUN apt-get update \ - && apt-get upgrade -y \ - && apt-get install -y wget \ - && apt-get install -y tree \ - && wget https://dot.net/v1/dotnet-install.sh -O dotnet-install.sh \ - && chmod +x ./dotnet-install.sh \ - && ./dotnet-install.sh --channel 8.0 ENV DOTNET_NOLOGO=true ENV DOTNET_SKIP_FIRST_TIME_EXPERIENCE=true -ENV DOTNET_ROOT=/root/.dotnet -ENV PATH="$PATH:$DOTNET_ROOT:$DOTNET_ROOT/tools" - + ADD . /logging-log4net RUN dotnet restore /logging-log4net/src/log4net.sln RUN dotnet build -c Release /logging-log4net/src/log4net.sln diff --git a/src/changelog/3.4.0/305-docker-sdk-image.xml b/src/changelog/3.4.0/305-docker-sdk-image.xml new file mode 100644 index 00000000..dc06e11f --- /dev/null +++ b/src/changelog/3.4.0/305-docker-sdk-image.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<entry xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns="https://logging.apache.org/xml/ns" + xsi:schemaLocation="https://logging.apache.org/xml/ns https://logging.apache.org/xml/ns/log4j-changelog-0.xsd" + type="changed"> + <issue id="305" link="https://github.com/apache/logging-log4net/pull/305"/> + <description format="asciidoc"> + build the container image from `mcr.microsoft.com/dotnet/sdk:10.0-noble` instead of installing + a SDK into `ubuntu:20.04` with `dotnet-install.sh`. This moves off an Ubuntu release that left + standard support in April 2025 and drops the download step, the Mono packages and the + `DOTNET_ROOT` and `PATH` handling + </description> +</entry>
