The Panama canal locks are an amazing feat of
engineering. They have been running continually for over 100 years. The
technology is almost the same now as it was 100 years ago. "Mules" (small
electric trains) have lines to the bow and stern to hold the boat in the
middle of the lock while it moves through.
They are not always entirely successful. While
we were watching there was a cloud of concrete dust as as a container ship
brushed against the side of the lock. These ships pay between $300,000 and
$500,000 for a transit and get their sides scraped in the process.