Docker Community Forums

Share and learn in the Docker community.

Windows Service Application Dockerize


(Bahadirkurt99) #1

Hi,

I have a Visual Studio 2012 Solution and there is a project inside it and this project is a windows service.
Project’s Target Framework: .Net Framework 4

DOCKERFILE INCLUDES:

FROM microsoft/dotnet:1.1-sdk
#FROM microsoft/dotnet-framework:4

Setting Home Directory for application

WORKDIR /app

Note: Install .Net 4 Targeting Pack

RUN Invoke-WebRequest -Uri “http://download.microsoft.com/download/9/5/A/95A9616B-7A37-4AF6-BC36-D6EA96C8DAAE/dotNetFx40_Full_x86_x64.exe” -OutFile “dotNetFx40_Full_x86_x64.exe” -UseBasicParsing
RUN .\dotNetFx40_Full_x86_x64.exe /q /norestart

copy csproj and restore as distinct layers

COPY TEST.csproj .
RUN dotnet restore

RUN dotnet publish -c Release -o out

EXPOSE 15166

ENTRYPOINT [“dotnet”, “bin\Debug\TEST.exe”]

ERROR MESSAGE IS:
Step 4/7 : RUN .\dotNetFx40_Full_x86_x64.exe /q /norestart
—> Running in ff8T2KK2161f
The command ‘powershell -Command $ErrorActionPreference = ‘Stop’; $ProgressPreference = ‘SilentlyContinue’; .\dotNetFx40_Full_x86_x64.exe /q /norestart’ returned a non-zero code: 1

MY DOCKER IMAGES ARE:
microsoft/aspnetcore-build
microsoft/dotnet
microsoft/dotnet
hello-world
microsoft/dotnet-framework
microsoft/windowsservercore

How shall I proceed to solve this error?

Best Regards,
Bahadir


(Ravihdcc) #2

did you able to dockerize the window service application?