The initial attachment of a membrane or protein to a target membrane. Docking requires only that the proteins come close enough to interact and adhere.