Refactored to leverage the new interface of dockerAnalyzer.

Part of https://github.com/nearform/nscale-kernel/pull/19