Both airports and train stations generally don't move, and are a hotspot in terms of risk for bombs and such.
Ships, on the other hand, tend to move.
The german Wasserschutzpolizei has a K9 unit, and they're sometimes used along with the Zoll K9 units to inspect incoming cargoships in the german high seas ports. This is within legal bounds.
Out of experience i can tell you that the cruise terminal in Hamburg also gets a Zoll K9 unit sometimes, when boats arrive from cruises in the caribbean.
You'll not see K9s onboard of cruiseships, as the police or customs or whatever would need a courts order to even be allowed onto the boat to search it.