m19v
m19v

Reputation: 2192

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, i.e. windows and the status of engine is healthy.

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

{"message":"page not found"}

Upvotes: 1

Views: 2452

Answers (1)

Hans Kilian
Hans Kilian

Reputation: 25479

You could use the /info endpoint, i.e. 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

Upvotes: 3

Related Questions