by dijit · 4y ago · 0 comments
Exposing the docker daemon on the network and setting DOCKER_HOST I’m able to use the remote machine as if it was local.
It’s hugely beneficial, I’ve considered making mini buildfarms that load balance this connection in a deterministic way.
If you have a secure network then it’s perfectly fine to expose the docker port on the network in plaintext without authentication.
Otherwise you can use Port forwarding over SSH.
To set up networked docker you can follow this: https://docs.docker.com/engine/security/protect-access/
I’m on the phone so can’t give a detailed guide.
BTW, no need to expose DOCKER_HOST, you can connect to docker over ssh, e.g. `DOCKER_HOST=ssh://1.2.3.4`.