Can't find a way to run fully within docker

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hey all, I'm trying to get a hotspot running fully within a
docker-compose service, and I'm running into interesting issues

I've also asked in the docker community, but haven't had much luck
yet. Do let me know if there's a better place than this to ask.

Hostapd can clearly run within docker, as shown by
https://github.com/fgg89/docker-ap/, but that particular approach
seems to require external scripts to link the networking from a netns
of the host to within the container.

I'm attempting to make it work without the external scripts. The
approach that I think has the most potential is encapsulating
everything from the github repo into the container. Most of it is
trivial, but I haven't found a way to get networking to work, even
after adding almost every relevant privilege/volume.

Hostapd still runs and seems to think things are fine (within the container):

```
/# hostapd /etc/hostapd/hostapd.conf
Configuration file: /etc/hostapd/hostapd.conf
Using interface wlan0 with hwaddr 00:04:4b:a7:e6:b4 and ssid "ap-test-ssid"
wlan0: interface state UNINITIALIZED->ENABLED
wlan0: AP-ENABLED
```

but the host still uses wlan0 as a client with `UP BROADCAST RUNNING
MULTICAST`. For one, this might be considered a hostapd bug, as it
thinks it created a hotspot while it didn't.

For context, here's what the docker-compose service looks like:

```
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
```

and the scripts used fgg89's commands, but globally (without netns).

Any clue what other privileges I might need to add, or even why
hostapd would think it's doing fine?

The target device is a tegra tk2, arm64v8

Thanks for your time,

Matei

_______________________________________________
Hostap mailing list
Hostap@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/hostap



[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux