【问题标题】:Why does it give 'docker' error when running running Import-TestToolkitToNavContainer?为什么在运行 Import-TestToolkitToNavContainer 时会出现“docker”错误?
【发布时间】:2021-03-11 02:16:34
【问题描述】:

我从 Powershell 运行以下命令将 TestToolkit 安装到 Azure 中的容器

  Import-TestToolkitToNavContainer -containerName <BC CONTAINER NAME IN AZURE>

但我得到了错误

   "Import-TestToolkitToNavContainer : The term 'docker' is not recognized as the name of a cmdlet, 
   function, script file, or operable program. Check the spelling of the name, or if a path was 
   included, verify that the path is correct and try again."

有什么想法吗?我需要安装模块吗?

更新: 它是一个 Azure 容器。但与此同时,我已经运行了一个运行 docker 的 Azure VM。我可以在 VM 上登录 Business Central,这比容器更近了一步。但是我怎样才能在我正在使用的 Postman 中取回元数据? 我尝试了以下方法:

     http://Server:OdataServicePort/ServiceName/api/beta/$metadata

     Server = WebClient 
     OdataServicePort: ?? is it 7748 or can i retrieve it
     ServiceName:  SandBox <--is that correct or can i retrieve this as well

我正在对 BC 中的用户和 Web 访问密钥使用基本身份验证。

这是检索元数据的正确方法吗?

【问题讨论】:

  • 您使用的是 BcContainerHelper 还是 NavContainerHelper?
  • 抱歉错字....我认为您可以使用 Import-TestToolkitToBCContainer -name 导入现有容器
  • 当您说“Azure 中的容器”时,它是 Azure 容器还是运行 docker 的 Azure VM?
  • 我已经更新了问题

标签: powershell azure-container-service dynamics-business-central


【解决方案1】:

您应该首先从 PowerShell 运行 Get-BcContainerServerConfiguration

根据此命令的结果,您可以构建正确的 URL:

http://[ContainerName]:[ODataServicesPort]/[ServerInstance]/api/v1.0

注意:如果在创建容器时启用 SSL,则需要使用 https 而不是 http

【讨论】:

  • 我不断收到错误消息:Invoke-ScriptInBcContainer:术语“docker”未被识别为 cmdlet、函数、脚本文件或可运行程序的名称。检查名称的拼写,
猜你喜欢
  • 1970-01-01
  • 2020-04-13
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多