EvilFreelancer / docker-routeros

Mikrotik RouterOS inside Docker container
https://hub.docker.com/r/evilfreelancer/docker-routeros/
MIT License
369 stars 132 forks source link

unable to start #5

Closed hzwjm closed 4 years ago

hzwjm commented 4 years ago

Hello, failed to start using least image.

docker logs routeros

Failed to send flush request: Operation not permitted RTNETLINK answers: Operation not permitted Error: argument "qemubr0" is wrong: Device does not exist

RTNETLINK answers: Operation not permitted Cannot find device "qemubr0" udhcpd: started, v1.31.1 udhcpd: max_leases=235 is too big, setting to 1 udhcpd: can't open '/var/lib/udhcpd/udhcpd.leases': No such file or directory udhcpd: ioctl 0x8933 failed: No such device qemu-system-x86_64: could not open /dev/net/tun: No such file or directory

EvilFreelancer commented 4 years ago

Hello! Seems you not pushed /dev/net/tun into your docker container and not enabled NET_ADMIN, try someting like this:

version: "3"

services:

  routeros:
    image: evilfreelancer/docker-routeros:6.46.5
    restart: unless-stopped
    cap_add:
      - NET_ADMIN
    devices:
      - /dev/net/tun
    ports:
      - "22222:22"
      - "22223:23"
      - "28728:8728"
      - "28729:8729"
hzwjm commented 4 years ago

I did not use docker-compose, i found the problem, run the container as privileged

hzwjm commented 4 years ago

Thank

EvilFreelancer commented 4 years ago

Glad to help! I will need update documentation and add notes about privileged mode + tun.