Hacker News new | past | comments | ask | show | jobs | submit login

You can use a remote docker host pretty easily. I've been playing with qemu on my mac since I read the announcement regarding docker for mac no longer being free (as in beer). I have port 5555 forwarded to 22 on the qemu vm so I can ssh into it. You can use whatever you want for virtual machines of course. Qemu seems nice these days but requires a bit of fiddling to get working. Virtualbox or vmware are probably easier. And this works just as well with cloud based virtual machines or any kind of remote host.

Assuming you have docker and ssh running on your remote host:

  # point docker on your mac to your remote machine
  export DOCKER_HOST=ssh://dude@localhost:5555
  # run nginx or whatever you want
  docker run -p 8080:80 nginx
  # forward the port locally
  ssh -L 8080:localhost:8080 -p 5555 jilles@localhost
  # open http://localhost:8080 in your browser
There are all sorts of things you can do beyond this to make this more seamless but this is pretty sweet already.



Consider applying for YC's Spring batch! Applications are open till Feb 11.

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

Search: