Manage service failed with multi-container

Hey,

I work on projet which create an wifi access point with hostapd. When I start project on single-container, my project works correctly. But with microservice architecture service hostapd start failed. I think service missing permission.
This is my docker-compose file :

version: '2'
services:
  WifiManager:
    build: ./Wifi_man
    container_name: WifiManager
    privileged: true
    tty: true
    restart: always
    network_mode: host
    cap_add:
      - NET_ADMIN

this is my dockerfile :

FROM balenalib/hummingboard

RUN apt-get update && apt-get install -y  dbus  hostapd rfkill

#copy network configurations
RUN rm /etc/default/hostapd
COPY conf/hostapd_default.conf /etc/default/hostapd
COPY conf/hostapd.conf /etc/hostapd/hostapd.conf
COPY conf/dnsmasq.conf /etc/dnsmasq.conf
COPY conf/interfaces /etc/network/interfaces

# Create WifiManager directory -> app directory
RUN mkdir -p /usr/bin/dsi/WifiManager

# Set our working directory
WORKDIR /usr/bin/dsi/WifiManager

# copy of service script
COPY scripts/ .

#CMD tail -f
CMD bash wifi_manager

Are you any idea of permission setting ?
Thanks
Ben

Hey there @benat,

Thanks for getting in touch with us. We have a project called wifi-connect

  wifi-connect:
    build: ./wifi-connect
    restart: always
    network_mode: host
    privileged: true
    labels:
      io.balena.features.dbus: '1'
      io.balena.features.firmware: '1'

You could try adding the labels on your docker-compose and see if that help.

Let me know how it goes.

Cheers

Thanks for you feedback. I am able to manage hostapd service now.

Ben