I recently moved a single container app to a multicontainer app and Network Manager is no longer working
root@fincm3-xxxxxx:/usr/src/app# nmcli Error: Could not create NMClient object: Could not connect: No such file or directory.
Here is my docker-compose.yml
version: '2' volumes: resin-data: services: perfmon: build: ./perfmon network_mode: host privileged: true restart: always expose: - "80" volumes: - 'resin-data:/data'
Based on https://www.balena.io/docs/reference/OS/network/2.x/#changing-the-network-at-runtime I already had the following lines in ./perfmon/Dockerfile.template. This was working in a single app container:
ENV INITSYSTEM on ENV DBUS_SYSTEM_BUS_ADDRESS=unix:path=/host/run/dbus/system_bus_socket RUN apt-get update && apt-get install -y network-manager && systemctl mask NetworkManager.service