Running on a Raspberry Pi 3. wlan1 (edimax) is connected to the network, wlan0 (built-in) is my intented hostapd interface. After running the script and starting the docker container, i can repro the issue like this:
> export IFACE=wlan0
> export DOCKER_NAME=ap-container
> export PHY=$(cat /sys/class/net/"$IFACE"/phy80211/name)
> echo $PHY
phy0
> pid=$(docker inspect -f '{{.State.Pid}}' $DOCKER_NAME)
> echo $pid
1143
> iw phy "$PHY" set netns "$pid"
command failed: Operation not supported (-95)
Running on a Raspberry Pi 3.
wlan1(edimax) is connected to the network,wlan0(built-in) is my intented hostapd interface. After running the script and starting the docker container, i can repro the issue like this: