我目前有一个Hyper-V虚拟机,其客户操作系统是Microsoft Server 2016
我能够安装Docker服务并使用命令行来创build泊坞窗图像
我想在Visual Studio中使用compose来尝试相同的过程,但是看起来像只有在安装了ToolBox的情况下才会起作用。 我安装了工具箱,当我build立我得到一个错误的规范,我相信这是因为目标操作系统是Linux。
由于Windows Server 2016与Docker for Windows不兼容,在针对Windows Containers onc只能使用service + powerhsell的情况下,如果他们想在Visual Studio中使用Compose,则必须在内部禁用hyper-visor并确保Linux VM正在运行?
我有点困惑与Docker的Windows服务器+ VS的工作stream程。 谢谢你的澄清。
编辑:
我卸载了ToolBox来简化环境,我下载了这样的组合:
Invoke-WebRequest " https://github.com/docker/compose/releases/download/1.15.0-rc1/docker-compose-Windows-x86_64.exe" -UseBasicParsing -OutFile $Env:ProgramFiles\docker\docker-compose.exe
而现在的构build错误是:
ERROR: for dockercompose1517717654_azurecontainersite_1 __init__() got an unexpected keyword argument 'cpu_count' ERROR: for azurecontainersite __init__() got an unexpected keyword argument 'cpu_count' Traceback (most recent call last): File "docker-compose", line 3, in <module> File "compose\cli\main.py", line 68, in main File "compose\cli\main.py", line 118, in perform_command File "compose\cli\main.py", line 926, in up File "compose\project.py", line 424, in up File "compose\parallel.py", line 69, in parallel_execute TypeError: __init__() got an unexpected keyword argument 'cpu_count' Failed to execute script docker-compose.
此时Visual Studio工具只支持Linux容器。 如果/当这种变化,我会更新这个答案。
同样为了让VS和Compose在server 2016上工作,我使用以下链接安装了Docker for Windows的边缘版本:
https://store.docker.com/editions/community/docker-ce-desktop-windows