The union representing locked-out port workers in British Columbia is planning a court challenge after the federal government moved to end the work stoppage.