Точка входа консольного приложения
Код: Выделить всё
private static void Main(string[] args)
{
using (var host = new ServiceHost(new DiscoveryProxyService(), "net.pipe://localhost/testname"))
{
ServiceDiscoveryProxyEndpointConfigurator.Configure(host, endpointConfig);
host.Open();
}
}
Код: Выделить всё
FROM mcr.microsoft.com/dotnet/framework/wcf:4.7.2-windowsservercore-ltsc2019
SHELL ["powershell"]
RUN Install-WindowsFeature -name NET-WCF-Pipe-Activation45
RUN Install-WindowsFeature -name NET-WCF-TCP-Activation45
RUN Install-WindowsFeature -name NET-WCF-HTTP-Activation45
# Next, this Dockerfile creates a directory for your application
WORKDIR WcfDiscoveryProxyTest
# Copies the site you published earlier into the container.
COPY WcfDiscoveryProxyTest/ .
# start WCFTCPSElfHost service process in container as entrypoint process.
ENTRYPOINT .\bin\Debug\WcfDiscoveryProxyTest.exe
Код: Выделить всё
docker build -t test:latest .
docker run -d -itd -v \\.\pipe\localhost\testname:\\.\pipe\localhost\testname test:latest
Подробнее здесь: https://stackoverflow.com/questions/643 ... containers