Dublin is capital of Ireland and is a part of the island of lreland, which is one of the British Isles. Great Britain is the largest of the Isles and it consists of Scotland, Wales and England.
The City of London is part of London as a metropolitan area which is made up of Boroughs. There are 32 boroughs.
Ireland is not the British Isles. Northern Ireland is in the United Kingdom but not the British Isles, it is on the island of Ireland and so too, naturally is Dublin. The British Isles are all islands within 50 miles of the mainland and that come under the jurisdiction of England (e.g. wight and Scilly), Scotland (e.g. Skye, Mull or the Hebridines) and Wales (Anglesey).
The City of London is part of London as a metropolitan area which is made up of Boroughs. There are 32 boroughs.