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服务防护重新启动