Almost 3,000lbs (1,300kg) of cocaine was seized on a container ship bound for Málaga, Spanish officials have said.