The shop's API has to know where to find the database. Writing an address like 172.17.0.2 into its settings is fragile: Docker hands out addresses at start, and after a restart the database may end up at another address. It is handier to write the name db into the settings and know it always leads to the database.
In this lesson
- The default network knows no names
- A user-defined network
- A name survives an address change
- Common mistake
- Key points