Docker Community Forums

Share and learn in the Docker community.

Running WCF host in Docker Container (Console Applciation)

(Umerwasim) #1

I am working on a legacy project. My task is to run the project in the container. It is a WCF service. As a console application (or windows application) it is working perfectly fine. However, when I add a docker support (see docker file below), and perform a build (creating an image and container) it ends up with following message (in debug). Kindly help me. Please note (as I mentioned before) as console application (or windows application) it works perfectly fine and there is no issue.

Cannot start service from the command line or a debugger. A Windows Service must first be installed (using installutil.exe) and then started with the ServerExplorer, Windows Services Administrative tool or the NET START command. The program ‘[1920] WcfHost.exe’ has exited with code 0 (0x0).

---------Docker file (automatically created when I add docker support)

FROM microsoft/dotnet-framework:4.7.1-windowsservercore-1709 ARG source WORKDIR /app EXPOSE 83 COPY ${source:-obj/Docker/publish} . ENTRYPOINT [“C:\\app\\WcfHost”]