Frappe Docker: how to get the version of dependent Apps and other packages

I wanted to upgrade ERPNext and its dependent apps from its current version to another.
For example i have decided to upgrade ERPNext to 14.20.0 to 14.40.0
How do i identify the corresponding version of below

  1. Frappe Version
  2. Other Frappe Apps(Say HRMS) Version
  3. NODE_VERSION
  4. PY_VERSION