dock: compact code.

Change-Id: I8f26c35a89a16e81b228c9256e624e650dd7efd2