there are two ports in Dubrovnik:
1.) the main port (Gruz) where your ship is either docked or at anchor (if there are more ships than available berths, which happens fairly often). While you can walk over to the old town from there, taking a taxi or a shuttle bus (which some cruise lines offer) is probably a better option as it leaves you with more time in the old town.
2.) the old town where your is at anchor. The tender station is right by the old town and everything is within easy walking distance.