Docker Community Forums

Share and learn in the Docker community.

Docker-compose friendly wireless access point for arm setup

I’m trying to make an all-docker access point for an armv8 machine (a tegra tk2, but seeing it work for any one platform would be nice too).
The hope is that you’d be able to put it in a docker-compose file, and while docker-compose up runs, the AP is up. Ideally this would be done without invoking external scripts, other than once for setup

Has anyone found something like this?
Given that I know almost nothing about advanced docker usage, I’ve spent the last couple of days trying to create a service like that from https://github.com/fgg89/docker-ap/, but with no luck. I got it to the point where the hostapd daemon wasn’t complaining, with wlan0: AP-ENABLED, but ifconfig wlan0 from the host shows UP BROADCAST RUNNING MULTICAST, and the interface is used as a wifi client.
It seems weird that hostapd wouldn’t complain about anything.

The approach that seemed to “almost work” the most involved a docker-compose service that looks something like this:


version: "3.7"

services:
  hotspot:
    build:
      context: .
      dockerfile: Dockerfile
    network_mode: host
    security_opt:
      - seccomp:unconfined
      - apparmor:unconfined
    privileged: true
    cap_add:
      - ALL
    volumes:
      - /dev:/dev
      # + others for development / tegra-specific stuff
    sysctls:
      - net.ipv4.ip_forward=1

I try to thin the networking abstraction as much as I can, then within the scripts I run the netns commands that worked in fgg89’s version, but without namespacing, hoping that it would apply to the whole system. Some changes do seem to work, but I just can’t seem to get the interface to work in AP mode.

Any suggestions? Maybe more privileges need to be granted?