Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

FWIW I do the same thing but with docker.

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.



Do you have any more information about how you're doing this? Whenever I've tried to use Docker as a remote development environment the process felt very foreign and convoluted.


I know what you mean, It depends a little bit on your topology.

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.


Or you can use a docker as a ssh host using context, or just $DOCKER_HOST=ssh://myremote... See https://stackoverflow.com/questions/44056501/how-can-i-remot...


Hopefully you are doing this securely :)

BTW, no need to expose DOCKER_HOST, you can connect to docker over ssh, e.g. `DOCKER_HOST=ssh://1.2.3.4`.


How do you share code files (set volume mounts) with remote docker via setup?


Is there a benefit to this over SSH or VSCode remote?


Neither SSH not VSCode offer any kind of isolation out of the box.


I mean running docker on the remote machine and just sshing into it. I assume changing the docker host on OSX just means a command is being sent over the network. Just wondering why prioritize "local" development if its all remote anyway.


Setting up SSH inside a container and being able to SSH into the container wasn't so trivial to do, last time I read about it. If I recall correctly, there were also some host system security implications. What do you mean by 'prioritize "local" development'?


"Machine A" SSHes into "Machine B". "Machine B" is running Docker. You run docker commands on "Machine B". The output of the command is returned to "Machine A". I.e. a normal ssh session. At no point do you ssh into a container.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: