Two spaceships from different cultures, nay different species meet up. Friendly communications is established. For whatever reasons, physical contact is desired, trade, cultural exchange, some of those alien MOSs are cute etc. The two ships dock no fuss no muss.
First of all docking is one of the most stressful tasks a pilot can undertake. Ships are designed to travel in mostly empty space. Snuggling up to another mass of engines, fuel tanks and struts requires a deft hand on the thrusters. Add to this that docking can mess up one or both ships and the ship's Captain is probably breathing down the pilot's neck while calculating the cost of various collisions.
So the pilot does all that and ... the docking rings don't match up.
So in some venues everyone says "Screw this," and heads to the teleporter! If you're in a more Joss Whedon setting you pile into a shuttle or grab a spacesuit.
There's no reason for assuming docking rings will match. They roughly correspond to airlock hatches. A two ton sentient cephalopod will require a really big hatch with a ring to match. An uplifted squirrel monkey needs a much smaller hatch. Then there are the bee people of Honeypod III who have hexagonal docking ports and the Ooli who love ovals.
This is when that Mech-1 you took is gold.
As for humans in general eventually someone somewhere is going to start standardizing docking rings (and hatches). All rings must be of circular of X meters in radius and so on. But the mating features can still be a problem (no not that way). Human technology has two kinds of attachments, an innie and an outie. What if you both have innie docking rings, or both have outies? The last problem can be solved!
The airlock hatch is the gray circle in the middle. The inner yellow ring has sockets on the outside, the red ring has flanges along it inside that match the sockets on the outside of the yellow ring. Either ring can be extended. So when you want to dock you call the other pilot and determine who gets to lead, or extend their red ring. The other extends the yellow ring a bit further to fit inside the red ring and the flanges are extended to make the seal tight. The circles on the top of the red ring are bolts that can be extended or retracted or magnetized to aid in the stability of docking.
After docking both ships open their airlock hatches. Both are inward opening to avoid smacking hatches together and because air exiting an inward hatch can slam it shut making for a moment of terror followed by a wonderful anticlimax. There are still going to be problems. There are going to be different sized docking ports and rings on larger ships to accommodate large groups of troops or cargo transfers. The size of docking rings might also change over decades or centuries making entering that old hulk a little harder. In a pinch two dissimilar rings could be used. Stick the smaller ring inside the larger and apply emergency sealant #6 via EVA. It should hold. Try not to jostle the ships too much. Also leave the hatches closed after using them.
Optionally the hatch could include a touchscreen on both sides reporting conditions on the other side. For that space opera feel add a telltale for gravity (strength and direction). After all there's not telling which way you'll fall going into a strange ship.
There should be a mechanical means of controlling and moving the docking ring. That sort of control is mounted outside the ring and a distance away to allow workers to operate it while a rescue or salvage ship arrives in an emergency. That sort of thing is under a very sturdy lock to make sure it is only used by the crew or someone who has the luxury of playing a torch over it for several minutes (which pirates typically do not have, being shot at and such).