You often have several docker containers and applications which work together in the locel development environment. You need the following communications:
- docker container to localhost
- localhost to docker container
- docker container to docker container
You have a way to connect localhost-to-docker using -p
(port-mapping) docker option.
For instance, you can start PostgreSQL container using -p 0.0.0.0:5432:5432
and then connect like to normal PostgreSQL