Skip to content

Instantly share code, notes, and snippets.

View 1e1f's full-sized avatar

Leif Shackelford 1e1f

View GitHub Profile
@excavador
excavador / README.md
Last active November 6, 2022 21:48
automatically add alias ip address to loopback

Motivation

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