I hosted Git daemon on local host i.e.
'/usr/bin/git daemon --listen=127.0.0.1 --base-path=/opt' as a
systemd service and I am trying to access it from docker container. I didn’t mentioned the port because I don’t want to expose the port to outside network.
RUN git clone git://127.0.0.1/repo/ repo_dir
But its not working, its looks like inside container its trying to connect localhost of container.
So How to connect connect localhost of Host machine from Docker container?