docker-compose ¶
How to use the local postgresql database (host.docker.internal) with the django service in a docker-compose file ? ¶
-
https://docs.docker.com/compose/compose-file/compose-file-v3/#extra_hosts
-
20.10.0 (2020-12-08), host.docker.internal in dockerd on Linux
We have to add these extra_hosts parameter in the docker-compose file.
extra_hosts:
# Support host.docker.internal in dockerd on Linux
- "host.docker.internal:host-gateway"