簡體   English   中英

Docker Windows容器中的Powershell列表過程產生空列表

[英]Powershell List Process in Docker Windows Container Produces Empty List

為了將調試器附加到Windows容器中,我需要獲取在Windows容器中運行的dotnet應用程序的進程ID,但是當我嘗試列出進程時,我得到一個空列表。

PS > docker exec -it --privileged elated_swartz powershell -Command Get-CimInstance Win32_Process | Select-Object ProcessId, CommandLine

ProcessId CommandLine
--------- -----------

PS版本5.1.15063.483

Docker客戶端:版本:17.06.0-ce API版本:1.30 Go版本:go1.8.3 Git commit:02c1d87內置:Fri Jun 23 21:30:30 2017 OS / Arch:Windows / amd64

Docker服務器:版本:17.06.0-ce API版本:1.30(最低版本1.24)Go版本:go1.8.3 Git提交:02c1d87內置:Fri Jun 23 22:19:00 2017 OS / Arch:Windows / amd64實驗:true

在* nix中:

docker top <container>

在Windows中使用CMD:

docker exec <container> tasklist

使用Powershell:

docker exec <container> powershell get-process

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM