根据PID查找容器ID:
docker inspect -f "{{.Id}} {{.State.Pid}} {{.Config.Hostname}}" $(docker ps -q) |grep <pid>
根据容器查找PID:
docker top <container>
根据PID查找容器ID:
docker inspect -f "{{.Id}} {{.State.Pid}} {{.Config.Hostname}}" $(docker ps -q) |grep <pid>
根据容器查找PID:
docker top <container>