docker容器中缺少进程的PID [英] Missing PID for process inside docker container
本文介绍了docker容器中缺少进程的PID的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在docker容器中运行一个简单的Web应用程序。当我查看netstat的输出时,PID /程序名称为空白。
I'm running a simple web application inside a docker container. When I look at the output of netstat, the PID/Program name is blank.
root @ fasf343344423#sudo netstat -tulnp
有效的Internet连接(仅服务器)
Proto Recv-Q发送- Q本地地址外部地址状态PID /程序名称
tcp 0 0 0.0.0.0:5697 0.0.0.0:* LISTEN-
tcp 0 0 0.0.0.0:9090 0.0.0.0:* LISTEN -
我以前在其他设置上看到过PID。因此,我想了解这是否是由于安装问题引起的。感谢您的帮助
I've seen the PID before on a different setup. So, I want to understand if this is because of a setup issue. Appreciate your help
推荐答案
我能够通过以下更改来解决此问题:
I was able to resolve this with the following change:
-
编辑
/etc/apparmor.d/docker
文件并添加以下行
ptrace peer=docker-default,
sudo服务防护重新启动
这篇关于docker容器中缺少进程的PID的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文