canonical / multipass-blueprints

Blueprint definitions for [`multipass launch`](https://multipass.run)
GNU General Public License v3.0
66 stars 38 forks source link

On what basis does the docker blueprint gain the rights to localhost:9000? #42

Closed kaosmaja closed 4 months ago

kaosmaja commented 4 months ago

I cannot see anything special like bridging ports to the host machine, so how come portainer shows up on localhost? Usually you'd have to use the VM's IP.

townsend2010 commented 4 months ago

Hi @kaosmaja!

Could you please provide a few more details of your Multipass setup such as the output of multipass get local.driver and the host OS you are using? You might be using Virtualbox, but it's not clear to me at this time. Thanks!

kaosmaja commented 4 months ago

The output gives me QEMU and I'm using multipass 1.13.1 on Ubuntu 22.04 LTS. The behavior I'm seeing comes from a fresh multipass launch docker, and I have not added any blueprint sources.

To be clear, I'm fairly sure I don't have VBox on this machine.

townsend2010 commented 4 months ago

Ok, you are definitely not using VBox. I launched the docker Blueprint on my 22.04 machine and localhost:9000 is not reachable and I have to use the Multipass instance's IP address. Do you happen to have Docker/Portainer installed and running directly on your host?

kaosmaja commented 4 months ago

I don't think I have portainer but I do have docker installed but not running. Do you think it uses the default docker network to achieve this?

townsend2010 commented 4 months ago

Hi @kaosmaja,

I have docker running on my machine and localhost:9000 does not work (as expected). Aside from doing some manual port forwarding, the only way I can get that to work is to install and run Portainer on my host. I really have no idea why this behavior is happening for you. The Docker Blueprint is certainly not doing anything itself to make this happen.

kaosmaja commented 4 months ago

Thanks for testing! This has not persisted between restarts either, so maybe it's just a local thing after I messed around too much.