maelvls dev blog

maelvls dev blog

Systems software engineer. I write mostly about Kubernetes and Go. About

13 Sep2018

Remote Docker using docker-machine

Use docker-machine for remoting docker

docker-machine create --driver generic --generic-ip-address=141.115.74.15 --generic-ssh-key ~/.ssh/id_rsa --generic-ssh-user=mvalais polatouche-docker-host

eval $(docker-machine env polatouche-docker-host)

Tunneling

docker-machine ssh default -L 0.0.0.0:8000:localhost:8000

Namespaces, cgroups

  1. namespaces
  2. cgroup (systemd-cgls)

Commands

docker run --rm -it ubuntu
  • -i means interactive (stdin will be attached)
  • -t (--tty) means that this is a pseudo-tty terminal instead of a non-tty (for example, without tty, bash has no prompt; with a tty, it gives a nice prompt such as bash-4.4#).
📝 Edit this page