docker connects himself on 127.0.0.1, so most of the time (expect for ssh tunnels) client and server will be on the same server, it just a convenience that allow to pass a absolute path instead of piping the dockerfile