简体   繁体   中英

How to reach and check if docker engine is running in wsl2 from windows

Docker engine (not docker-desktop) is installed in wsl2 and listening to port 2375. I want to make sure it is running from outside, ie windows and the status of engine is healthy.

Is there any rest endpoint to check whether the docker is healthy or not. eg http://ip-of-wsl2:2375 returns:

{"message":"page not found"}

You could use the /info endpoint, ie http://ip-of-wsl2:2375/info . The response has a SystemStatus field that you can check.

More info: https://docs.docker.com/engine/api/v1.24/#33-misc

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM