Moving from VM to Docker/Portainer

I dont use esphome

How is that installed?
How does it connect with HA or does it use mosquitto?

EDIT
HA docker doesnt have addons

You need to install the Docker container just like mosquitto and add it to the dockerlocal network

dockerlocal network is what you want to use for container communication. You can use their hostname so you dont need to worry about ip changing

I have in a stack, homeassistant, mosquitto and esphome
each have a section:

    networks:
      dockerlocal:

and at the end of the stack I have:

networks:
  dockerlocal:
    driver: bridge 

I don’t know if it helps but for example I have one esphome device that is online but showing offline in the dashboard, it is called “garage”
if I try to ping garage or garage.local (either from my computer(Windows) of from the server (Debian) where the install resides, (both on the same network) it is not found.

I have my current homeassistent still running (on e VM standalone) along with my new setup (on Docker, different server, same network) I see the "garage"device online on both HA online, if I look at the ESPHome that is on the current HA it is showing connected to garage.local

Cap4

Could it be that it can only connect to one ESPHome dashboard at one time?

I would start new post on esphome and docker

Esphome say host networking required for online status but really, If this is true macvlan is best. They recommend expose port 6052 on mac instead of host mode so maybe exposing that single port is enough.

For esphome i dont think i will be help