q569321245
V2EX  ›  Docker

有关 docker host pid container pid 的问题

  •  
  •   q569321245 · May 20, 2021 · 1227 views
    This topic created in 1843 days ago, the information mentioned may be changed or developed.
    docker top xxx: 显示的 host pid 是 50951
    在容器内查看对应进程的 pid: 8088
    
    怎么在宿主机通过 50591 kill 掉容器内的进程
    
    
    1 replies    2021-05-21 11:09:15 +08:00
    julyclyde
        1
    julyclyde  
       May 21, 2021
    1 pstree -pa 50591 查看疑似进程在 host 上的号码
    2 /proc/pid/status 查看 NSpid 字段,核对是否为“容器内 8088”
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2888 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 31ms · UTC 04:56 · PVG 12:56 · LAX 21:56 · JFK 00:56
    ♥ Do have faith in what you're doing.