Ask HN: Use Docker Engine from VM

by kbbgl87on 1/18/2024, 9:09 PMwith 4 comments

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?

by JojoFatsanion 1/19/2024, 12:48 AM

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

by stop50on 1/18/2024, 9:31 PM

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