Describe the problem
Problem
Python apps run inside Docker containers with an isolated network
(e.g. arduino-securesmars_default). This prevents apps from
resolving local network hostnames such as pimqtt.local or any
other mDNS/local DNS hostname.
The host's /etc/hosts is not inherited by the container, and
mDNS multicast does not pass through Docker's network isolation.
Expected behavior
Apps should be able to connect to local network services by hostname,
including mDNS hostnames (*.local) and entries in the host's /etc/hosts.
What I tried
- Adding
extra_hosts to app.yaml — ignored, not added to generated compose file
- Adding hostname to
/etc/hosts on the UNO Q — not inherited by container
- The generated
.cache/app-compose.yaml only contains the default
msgpack-rpc-router:host-gateway extra_hosts entry with no way to add more
Suggested fix
Either:
- Support
extra_hosts in app.yaml and pass them through to the generated compose file
- Use
network_mode: host for the container
- Document a supported way to configure Docker networking for apps
Platform
- UNO Q BSP: 0.54.1
- arduino-app-cli: 0.8.0
- Use case: connecting to a local Mosquitto MQTT broker by hostname
To reproduce
Steps to Reproduce
- Create an app with a Python script that connects to a local network
service by hostname (e.g. a Mosquitto MQTT broker at pimqtt.local)
- Run
arduino-app-cli app start <app_path>
- Check app logs — connection fails with:
socket.gaierror: [Errno -2] Name or service not known
- Inspect
.cache/app-compose.yaml — container uses isolated Docker
network arduino-<appname>_default with no access to host DNS or mDNS
- Adding the hostname to
/etc/hosts on the UNO Q does not help —
the container does not inherit the host's /etc/hosts
- Adding
extra_hosts to app.yaml does not help — it is silently
ignored and not passed through to the generated compose file
Expected behavior
Expected Behavior
A Python app should be able to connect to local network services by
hostname, including:
- mDNS hostnames (*.local) such as
pimqtt.local
- Hostnames defined in the host's
/etc/hosts
- Any hostname resolvable on the local network
This is standard behavior for any application running on the UNO Q
outside of the Docker container, and should be equally available to
apps managed by arduino-app-cli.
Arduino App CLI version
Arduino App CLI version 0.8.4 daemon version: 0.8.4
Additional context
Additional Information
- The generated
.cache/app-compose.yaml uses an isolated Docker network
(arduino-<appname>_default) rather than host networking
- The
extra_hosts field appears in the arduino-app-cli JSON schema
(found via strings /usr/bin/arduino-app-cli) but is silently ignored
when specified in app.yaml
- This issue affects any app that needs to connect to a local network
service by hostname — MQTT brokers, local APIs, local databases, etc.
- Workaround requires manually editing
.cache/app-compose.yaml after
every app start, which is not a sustainable solution
- Using
network_mode: host in the compose file resolves the issue but
there is no supported way to configure this from app.yaml
Issue checklist
Describe the problem
Problem
Python apps run inside Docker containers with an isolated network
(e.g.
arduino-securesmars_default). This prevents apps fromresolving local network hostnames such as
pimqtt.localor anyother mDNS/local DNS hostname.
The host's
/etc/hostsis not inherited by the container, andmDNS multicast does not pass through Docker's network isolation.
Expected behavior
Apps should be able to connect to local network services by hostname,
including mDNS hostnames (*.local) and entries in the host's /etc/hosts.
What I tried
extra_hoststoapp.yaml— ignored, not added to generated compose file/etc/hostson the UNO Q — not inherited by container.cache/app-compose.yamlonly contains the defaultmsgpack-rpc-router:host-gatewayextra_hosts entry with no way to add moreSuggested fix
Either:
extra_hostsinapp.yamland pass them through to the generated compose filenetwork_mode: hostfor the containerPlatform
To reproduce
Steps to Reproduce
service by hostname (e.g. a Mosquitto MQTT broker at
pimqtt.local)arduino-app-cli app start <app_path>socket.gaierror: [Errno -2] Name or service not known.cache/app-compose.yaml— container uses isolated Dockernetwork
arduino-<appname>_defaultwith no access to host DNS or mDNS/etc/hostson the UNO Q does not help —the container does not inherit the host's
/etc/hostsextra_hoststoapp.yamldoes not help — it is silentlyignored and not passed through to the generated compose file
Expected behavior
Expected Behavior
A Python app should be able to connect to local network services by
hostname, including:
pimqtt.local/etc/hostsThis is standard behavior for any application running on the UNO Q
outside of the Docker container, and should be equally available to
apps managed by arduino-app-cli.
Arduino App CLI version
Arduino App CLI version 0.8.4 daemon version: 0.8.4
Additional context
Additional Information
.cache/app-compose.yamluses an isolated Docker network(
arduino-<appname>_default) rather than host networkingextra_hostsfield appears in the arduino-app-cli JSON schema(found via
strings /usr/bin/arduino-app-cli) but is silently ignoredwhen specified in
app.yamlservice by hostname — MQTT brokers, local APIs, local databases, etc.
.cache/app-compose.yamlafterevery
app start, which is not a sustainable solutionnetwork_mode: hostin the compose file resolves the issue butthere is no supported way to configure this from
app.yamlIssue checklist