OS Version/Build: Windows 10 Enterprise/19045.2364
App Version: .NET Framework 4.8
Hi all, new to docker and am working on trying to containerize one of my org’s solutions. It’s a windows service that is used to build data packages that are distributed to clients. It has a small web front end that is used to interact with it and kick off package builds. After building the image and running the container, I have all of the binaries from the Visual Studio solution copied over to a directory under C:/inetpub/wwwroot on the container, and have a port mapping from 1337 on my host machine to 80 on the container.
However, when I try to browse to localhost:1337 to access the web front end for the service running on the container I get a 403 error like the attached image. Would anyone happen to know what might be causing this?
I’ve attached the Dockerfile text as well for reference at the bottom, thanks in advance for any help.
escape=\
FROM mcr.microsoft.com/dotnet/framework/aspnet:4.8-windowsservercore-ltsc2019
SHELL [“powershell”, “-Command”, “$ErrorActionPreference = ‘Stop’; $ProgressPreference = ‘SilentlyContinue’;”]
COPY [“./bin”, “/inetpub/wwwroot/”]
RUN icacls ‘C:/inetpub/wwwroot’ /grant ‘Everyone:(OI)(CI)F’
WORKDIR “C:/inetpub/wwwroot/”
RUN New-Service -Name “"CDR”" -StartupType “"Automatic”" -BinaryPathName “"C:\inetpub\wwwroot\CDR_Service.exe”";
ENTRYPOINT [“powershell”]
CMD Start-Service "“CDR Service"”;
Get-EventLog -LogName System -After (Get-Date).AddHours(-1) | Format-List ;
$idx = (get-eventlog -LogName System -Newest 1).Index;
while ($true)
{;
start-sleep -Seconds 1;
$idx2 = (Get-EventLog -LogName System -newest 1).index;
get-eventlog -logname system -newest ($idx2 - $idx) | sort index | Format-List;
$idx = $idx2;
}