Given that Redding drew his inspiration for his song while staying on a houseboat in Sausalito, just across the Golden Gate from San Francisco, the "ships" were most likely ferries that regularly run between the two cities.
Otis Redding's co-writer Steve Cropper said that he initially thought Redding was referring to the large container ships entering the San Francisco Bay through the Golden Gate. But eventually he realized that Redding had observed the ferries coming in and out of the Sausalito docks.
Sausalito's first ferry service was launched in 1870. Passengers on the Northern Pacific Railroad could catch a ferry in the Marin county town and travel south across the bay to San Francisco. The first car ferry was opened in 1926. After the Golden Gate Bridge was completed in 1937, the car ferries were no longer needed, and the last one ended service in 1941.
Passenger service from Sausalito to The City as well as other Bayside locations, including Vallejo, Oakland and Angel Island, continues to this day.
This is one of the biographical references in the song. Redding was born in Georgia, and began writing the song while in the Bay Area for performances.
Otis Redding was born in Dawson, Georgia, and moved with his family to Macon when he was five. In 1967, while performing in San Francisco, he stayed on a houseboat in Sausalito and began writing "Dock of the Bay."
He completed the song later with co-writer Steve Cropper. Cropper suggested that it was he, not Redding, who was most responsible for adding the biographical references. According to Cropper, Redding was reluctant to write about himself, but for Cropper it was easy. "Otis was just bigger than life," he explained. Cropper ended up fleshing out Redding's outline. "He had just left San Francisco, where he played at the Fillmore," Cropper recalled. "So the rest of the song, where I said, you know, 'I left my home in Georgia, headed for the Frisco Bay,' it was just about him going out there to perform at the Fillmore."