How does one set an app containers hostname

Greetings, I want to be enable communication between containers. For example, I have frigate and mosquitto mqtt running in separate containers. If I were to start them from the command line to set the container hostname, I’d use:

docker run --name container-name

I don’t see anyway to do this in the app installation UI and the hostname for both containers is the hex container id which changes whenever you restart the containers.

help with this is greatly appreciated.

thanks
John

I need to do this in order to configure the mosquitto instance in the frigate config.yaml.

I came up with a workaround for my particular case. I modified the mosquitto container to bind to the Host interface. This way I get a stable IP. I modified the frigate config pointing it at the NAS host interface and Frigate now is able to connect to mosquitto, create topics and send messages.

I failed to mention that my NAS is running electric eel. I think there ought to be a way to set the DNS hostname of a container through the UI so that we can setup inter container communications. Perhaps I missed something so if anyone knows how to do this already, please enlighten me.

thanks
John

Hmm, I just noticed that if you setup custom apps in the UI, there is a field to set the container hostname. In the mosquitto and frigate apps, that I installed, this setting is not available.

The catalog apps are designed to be quick installs. Running your own custom compose app would let you set the container name.

services:
  myservice:
    image: myimage
    container_name: custom-container-name
1 Like

Thanks, I see that now. I’ll probably reinstall them as custom apps.