Help needed with Docker image for Jenkins, .NET Framework, and Visual Studio

Hello Docker community,

I am relatively new to Docker and currently working on creating a functional Docker image that includes Jenkins and all the necessary plugins. To achieve this, I started with the Jenkins base image. However, I encountered challenges when trying to install .NET Framework 4.8 and Chocolatey. During the installation process, Chocolatey indicated that .NET Framework 4.8 was missing, even when I attempted to install it either before or after Chocolatey.

Here’s my current Dockerfile:

FROM jenkins/jenkins:jdk11-hotspot-windowsservercore-2019

SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
#change version to install without .Net framework issue
ENV chocolateyVersion=1.4.0
RUN Set-ExecutionPolicy Bypass -Scope Process -Force; \
    [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; \
    iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))

#install require tools.
RUN choco feature disable --name="'usePackageExitCodes'"
RUN choco install git -y
RUN choco install microsoft-build-tools --version 14.0.25420.1 -y --allow-empty-checksums --params="Quiet" --force
RUN choco install visualstudio2022buildtools -y --force --quiet --norestart --wait --params="Quiet"
RUN choco install -y dotnet4.8

SHELL ["cmd", "/S", "/C"]

COPY .\libs C:\libs
COPY install-plugins.ps1 C:/install-plugins.ps1
COPY plugins.txt C:/libs/plugins.txt
# Need to fix it.
#RUN powershell -File C:/install-plugins.ps1 -PluginsFile C:/libs/plugins.txt

My ultimate goal is to have Jenkins, .NET Framework 4.8, Visual Studio 14 2015, and MSBuild 2022 properly installed within the Docker image, along with all the required plugins for my project.

I am unsure whether it is feasible to achieve this configuration using Docker, and I would greatly appreciate any insights or suggestions from experienced Docker users on how to effectively include Jenkins, .NET Framework 4.8, Visual Studio 14 2015, and MSBuild 2022 in the Docker image, along with the required plugins.

Thank you for your time and assistance!

Best regards.