Refactor get-key and get-config
Refactor get-docker