Visual studio docker and kubernetes support



我目前正在使用 Visual Studio 构建一个支持 docker 的控制台应用程序,问题是应用程序似乎没有在外部命令提示符下启动,而是 似乎在Visual Studio的内部控制台窗口中输出,如何使其在命令提示符窗口中执行?

似乎它使用的命令强制它输出到开发控制台窗口中

docker exec -i -w "/app" b6375046a58cba92571a425d937a16bd222d87b537af1c1d64ca6b4c845616c9 sh -c ""dotnet" --additionalProbingPath /root/.nuget/fallbackpackages2 --additionalProbingPath /root/.nuget/fallbackpackages  "bin/Debug/netcoreapp3.1/console.dll" | tee /dev/console"

如何使exec命令行输出到不同的窗口?

是否有可能以某种方式将这些容器应用程序部署到本地运行的 kubernetes 集群中? 因此利用 kubernetes 服务 - 而不是指定 IP 地址等?

没有测量"不同的窗口"。

可以在前台或分离模式 (-d( 中运行应用。

To start a container in detached mode, you use -d=true or just -d option. 

在预告中,您不应该将 -d 标志化

In foreground mode (the default when -d is not specified), docker run can start the process in the container and attach the console to the process’s standard input, output, and standard error

当然,您可以将应用程序部署到 kubernates 集群中。没有任何麻烦,请尝试minikube来实现您所需要的一切。

而kubernets服务是向世界或其他本地地方表示您的应用程序的另一种方式。

An abstract way to expose an application running on a set of Pods as a network service.

最新更新