How to find list of docker containers with PID (process ID)
The following command will show you a list of all running docker containers with their PIDs
docker inspect -f '{{.State.Pid}}, {{.Name}}' $(docker ps -q)
Example output:
9046, /wordpress-myblog-btronik_wpcli_1
8848, /wordpress-myblog-btronik_wordpress_1
8795, /wordpress-myblog-btronik_phpmyadmin_1
8599, /wordpress-myblog-btronik_mariadb_1
3627, /wordpress-secondpage_wpcli_1
3505, /wordpress-mywebsite_wpcli_1
3172, /wordpress-secondpage_wordpress_1
2907, /wordpress-mywebsite_wordpress_1
2646, /wordpress-secondpage_mariadb_1
2518, /webmail_roundcube_1
2323, /wordpress-mywebsite_mariadb_1
2303, /redmine-mywebsite_mariadb_1