Putting the vessel in dock is to be the right thing (8)
I believe the answer is:
berthing
'putting the vessel in dock is' is the definition.
I can't judge whether this defines the answer.
'be the right thing' is the wordplay.
'the right' becomes 'r' (common abbreviation).
'be'+'r'+'thing'='BERTHING'
'to' is the link.
Can you help me to learn more?
(Other definitions for berthing that I've seen before include "Coming into dock" , "Tying up a boat at a dock" .)