Settings

Theme

Ask HN: Use Docker Engine from VM

1 points by kbbgl87 2 years ago · 4 comments · 1 min read

Reader

I have a Mac host machine that has a Docker daemon running on it. I have multipass installed on the host machine which I use to create Ubuntu VMs. The VMs are created in a bridged network. I was able to set up ssh both ways so I can access the VMs from my host and vice versa. Thing is, my VM has very limited resources and I need to use Docker within it. I was thinking to set up the Docker client on the VM to use the Docker engine/daemon of my host machine. How would I do something like that?

JojoFatsani 2 years ago

Somewhere in the docker daemon’s config parameters I imagine: https://docs.docker.com/engine/reference/commandline/dockerd

stop50 2 years ago

You can open the socket on an network that can only be accessed between host an vm.

  • kbbgl87OP 2 years ago

    How would I do something like that? I know that docker socket is set up in /var/run/docker.socket. but how do I expose the socket to connections from the bridged network?

    • stop50 2 years ago

      docker doesn't care if its a unix socket or a tcp socket. This is documented in the docs.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection