How to convert Docker CLI command output to Java variable?

Hi!
I’m creating a Docker-based home-server manager application (only for testing) in Java language, but I stuck. The CLI commands result would convert to Java (such as HashMap or multidimensional array), but I don’t know how to realize this.

Help me to achieve this (google did not help :frowning: )