如何在Docker-Windows中查看文件结构?

时间:2019-10-23 03:48:22

标签: windows docker

我想看看像Docker-linux这样的文件结构,它使用以下语法:

docker exec -it <container id> bash

但是,现在我将Windows10与Docker-windows一起使用。我尝试使用以下语法,但失败:

docker exec -it <container id> bash
docker exec -it <container id> sh
docker exec -it <container id> //bin/bash

错误,例如:

  

提供程序:00000000-0000-0000-0000-000000000000]附加信息:{“ CommandLine”:“ // bin / bash”,“ WorkingDirectory”:“ C:\ App”,“ EmulateConsole”:true,“ CreateStdInPipe “:true,” CreateStdOutPipe“:true,” ConsoleSize“:[0,0]}

1 个答案:

答案 0 :(得分:2)

我认为您需要使用PowerShell,因为容器基于窗口而不是Linux。

docker exec -it <container id> powershell
相关问题