Posts in 2020
Docker container to connect localhost of host
in Docker
Inside Docker container, want to connect service on localhost of host machine. There is a magic hostname
host.docker.internal
can be used inside Docker container to reach localhost of host machine.Problem I have redis running in localhost, when I run a docker VM, I want to connect redis from inside of Docker VM, so I do not need docker-compose for another redis VM. Solution Docker for Mac: use host.docker.internal For Docker on Mac, there is a …