使用 VSTS 将 .net 核心应用程序部署到 Ubuntu

Deploying .net core app to Ubuntu using VSTS

我有一个 Azure Service Fabric 应用程序,其中包含一堆 .net 核心 2.1 服务,所有这些服务都愉快地部署到 windows 集群。我还没有创建 Ubuntu 服务结构实例,但想先了解所涉及的过程。

我现在想尝试将应用程序推送到 Ubuntu Service Fabric 集群。为此,我已将 Ubuntu 运行时标识符添加到 .csproj(它现在已声明 Ubuntu 和 win7-64)。

有人可以告诉我在 building/packaging Service Fabric 应用程序时是否需要在我的 VSTS 构建中执行某些操作吗?大概构建过程需要知道我想部署到 Ubuntu 集群而不是 Windows?

请参考 this link 构建您的 ASP.NET 核心应用程序

如果您不想使用Hosted Linux代理,那么您需要先Deploy an agent on Linux(这里是Ubuntu)。

然后尝试使用 VSTS 和 Docker 构建和部署 ASP.NET 核心到 Linux。

详情请见Continuous Delivery with Containers – Use Visual Studio Team Services and Docker to Build and Deploy ASP.NET Core to Linux

您还可以参考以下文章: