I have an active docker container (mongo running on WSL2, defualt Ubuntu). I know it is possible to identify container process on host, but ps -aux nor ps -A doesn’t really work.
While I can see my container in ‘docker container ps’, I can also connect and ‘docker container top’ produces results, I cannot see container process on host. PID visible in container top list is nowhere to be found amongst ps -aux or ps -A.
WSL integration options in Docker Desktop are enabled.
I’m wondering, if my issue is connected to something specific to WSL or there is something wrong in the setup.
user26412538 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
I believe that you are looking in the wrong place for the container process id.
Docker desktop installs its own special linux distribution in WSL. That distro is called docker-desktop
and that is where your containers processes execute.
Enabling the WSL integration option causes Docker Desktop to start the ‘integrated’ WSL vms and include them in the docker network.