Instalation media temp volume

Hello,

I have my first windows container setup where i first copy the installation media to the container and perform a setup.
This works fine, but i would like to skip the copy and remove step to save time.

I was wondering if it would not be possible to make a temp volume link to the installation media on my host so i do not have to copy and remove this from the container.

Here is my docker file so far. Any suggestions on how to improve are welcome

// Specifying Container Image
FROM mcr.microsoft.com/windows/servercore:ltsc2019

// Copy MSSQL SETUP FILES INTO THE CONTAINER
COPY ./source/SQL2019STDx64 c:/Source 
COPY configurationfile.ini c:/Source

// Install DOTNET AND MSSQL 2019

RUN powershell.exe -command \
install-windowsfeature -name NET-Framework-Features -IncludeAllSubFeature -Source c:/source/sxs; \
c:/source/setup.exe  /configurationfile=c:/source/configurationfile.ini; \  
sc.exe config MSSQLSERVER obj=LocalSystem; \ 
remove-item c:/source -Recurse

Please use code block for inserted codes (</> button). I fixed your post.

On Linux, you could use buildkit to mount a folder from the host.

RUN --mount=source=local/folder/path,target=/folder/in/the/container

I don’t know how you could do that on Windows. The other idea would be to use the hosts USB drive, but I don’t know how you could do that either.