1

我正在尝试使用 azure container instance fluent management sdk 启动一个 azure container 实例。我正在使用基于 Windows 的容器。我收到以下错误:

System.Private.CoreLib:执行函数时出现异常:SpinUp。Microsoft.Azure.Management.ContainerInstance.Fluent:不支持映像“/:v1”的操作系统版本。

它使用基于 Linux 的容器完美运行 - 代码:

var credentials = new AzureCredentials(new ServicePrincipalLoginInformation
{
      ClientId = "myid",
      ClientSecret = "mysecret"
}, "mytenant", AzureEnvironment.AzureGlobalCloud);

var azure = Azure
            .Configure()
            .WithLogLevel(HttpLoggingDelegatingHandler.Level.Basic)
            .Authenticate(credentials)
            .WithDefaultSubscription();
var group = azure.ContainerGroups.Define("testFloodscreener")
            .WithRegion(Region.USEast)
            .WithNewResourceGroup("UFHAEAST")
            .WithWindows()
            .WithPrivateImageRegistry("<myazurecr>", "<crusername>", "<crpassword>")
            .WithoutVolume()
            .DefineContainerInstance("<name>")
                .WithImage("<azurecr>/<imagename>:<tag>")
                .WithoutPorts()
                .WithCpuCoreCount(1)
                .WithCpuCoreCount(1)
                .WithMemorySizeInGB(1)
                .Attach()
            .WithRestartPolicy(ContainerGroupRestartPolicy.OnFailure)
            .Create();

任何帮助表示赞赏 - 我可以手动启动容器实例

4

1 回答 1

0

所以我自己找到了答案,Azure Container Instances using windows based containers - does not support 1709 based images,根据这个:

https://docs.microsoft.com/en-us/azure/container-instances/container-instances-troubleshooting

多哈

于 2018-04-24T11:43:07.710 回答