Are the two terms synonymous, or are they different? I've always tend to refer to the "racks" at which you can lock a bike as a "bike rack," but recently, when I started to use bike rentals, I've been hearing more and more of "bike dock," e.g., "check out the bike at bike dock #6" or "please return the bike to bike dock #5," etc...
In the context described, I believe that bike docks are specific to bikeshare systems. They lock the bicycle in place, and the locking mechanism is integrated into the docks. Each bikeshare system tends to have one main model of bicycle and the docks are specific to that model. Some bikeshare systems are moving to a dockless format, where you would park the bicycle in a reasonable location, the lock is integrated into the bicycle, and a user would use the app to locate and unlock a bicycle.
A rack (in the context of the question) is just a metal loop that you would lock any bike to. You could even lock a bikeshare bicycle to a rack. However, you are paying for that bikeshare bike, so it would probably be best to find the dock closest to your errand or destination and end your rental there. The bikeshare systems are not intended for rentals lasting several hours; they work best when you ride point to point and then the bicycle becomes available for a different user. Hence, their pricing systems make it expensive to take out a bike for several hours.
You would have to ask the person using the term "dock" to know for sure what they mean when they use the term "dock". That said…
Based on the examples you've given, and consistent with the plain-English usage of the word "dock", it seems that they are using the word "dock" to describe a specific location, as part of a rack or as a standalone device, rather than a rack in general.
A bike rack could have only space for a single bike. But most commonly, a bike rack will include space for two or more bikes. (That's of the stationary sort…we also call the device used to carry bikes on a vehicle a "bike rack"; that can have more than one space as well, but a) it's more common to see a vehicle rack made for a single bike, and b) it doesn't seem like that type of rack relates to your question at all.)
On the other hand, from the usage you describe, a "dock" is clearly meant to uniquely identify a single space. There can't be "the" bike at "bike dock #6" unless either the entire rack has only a single bike left on it, or the phrase refers to a single space within a bike rack or at a bike parking area. The latter seems much more likely to me.
You might find a "dock" as part of a larger structure, or you might find that a whole bike-parking area has some number of "docks", each of which is an independently mounted structure. A small bike shop might have constructed a rack from lumber, and then labeled each space of the rack to make "docks", or you might find a large area in a city where there is a bike-share program where some number of parking stands where bikes are locked and which provide additional features like a payment kiosk, helmet storage, etc.
In either case, and everything in between, the "dock" would be the single place where an individual bike would be parked.
Rack can be several different things in cycling
- A place to slot a wheel on your bike, for parking
- The rack over the front/back wheel for carrying parcels/bags/panniers
- A structure on the rear of a car for carrying a bike while driving
Dock is only used as a place to store and secure a bike.
One difference is that a rack is inanimate, normally metal. A Dock would be more likely to secure the bike too, having some kind of retention system. One example would be the "locky dock" installed in the streetside.
There's a folding arm that secures the bike, an ebike charger per stall, and you have to access your bike with an app. I'd see that as a Dock not a Rack.
Bike rack is a very common term used for a place people can leave their bikes. I would consider this pretty generic and that it could be used for many things. A person could be fussy and claim that only this or that type is a rack and these ones should be called bike stands and those ones should be called bike docks but since there are no rules for this being fussy about terminology seems pointless to me.
Bike dock is applied specifically to the stations used by the bike sharing scheme in my city and other cities I've been to. In my opinion this is because of the way the bikes engage with the station. They have a metal protrusion that is pushed in to a slot which then locks in place. This is similar to concepts like computer docking stations or subsidiary vessels docking with the mothership.
The people operating such schemes definitely want to differentiate between you "docking" the bike meaning the system knows you returned it and it is available again and you "locking" it which might mean you uses the cable to lock it to a nearby street sign which would mean the system still thinks you are using it.
Here's the best image I could find of the mechanism I'm talking about. You can see it on the downtube just below the black part where the bike attaches to the post on the right.