v7.1rc3 adds container support

Thanks you very much for your detailed answer,
Sorry for having mismatched devices and mounts
Implying I didn’t read the docs “hurted” because I did and couldn’t find anytying avout hid devices.

I’ll keep trying playing with the container features of routeros
I might keep pursuing my plan of attaching a raspi on my ups and have a “native” nut implementation…

The same way tun/tap access was enabled in containers under RouterOS maybe access to usb devices can be enabled too, with a proper feature request.

this is in our to do list.

Sweet, thank you!
PS: I’ve managed to trash the container config somehow, but I can’t reproduce it, even though I’ve tried to redo all the steps before it “broke”.
I had AdGuardHome running on it’s own root-dir and veth1, I’ve added a new veth for testing this: http://forum.mikrotik.com/t/problem-with-editing-file-in-container-store/161054/2
I’ve prepared the mount dir, added the container in a new root-dir obviously and with veth2.
Obviously it failed because it didn’t have support for arm64 so I went on to try it on hAP ac3.
When I went back to my RB5009, container print was listing the last container added but twice with different status (I repeat, same “name”), one with error, one with some other status.
AdGuardHome was not showing in container list, but it was still running (checked). I’ve tried deleting them but here something broke:
Terminal history was only going up two commands up to /container and it crashed there, no other input was possible, only in a new terminal window only to crash again at the same history line (same thing via SSH).
A reboot fixed it, I readded the AdGuardHome container to be sure of no problems.
Weird.

I’m going to deploy flungo/avahi in a container and I’m wondering how to connect it with VLANs.
Can anyone help me?

Hi @rplan,
I am also going to deploy flungo/avahi in container therefore I am looking for information on how to connect it with VLANs. One bridge for every VLAN?
Can you please guide me?

Like this.

Yes. Thank you very much!

Dear Friends , I have tried many dockers from hub.dockers.com most of them was related to VPN and Proxies and packet ofuscators, and I faced mostly with two problems , first problem , there is no “–cap-add NET_ADMIN” so you can not add dynamic tun interface inside the docker or you can not add special iptable rules inside the docker , and second huge problem when I start second container and set dst nat rules on same range docker bridge and interface or even on second docker bridge and interface , traffic for the first running container becomes lost , i have checked everything and many times , I did all settings with blank config and test environments but the problem exist , please guide me if there are solutions for those two problems. regards

You need to add the variables for your container before you pull it down:

/container/envs/add key=cap-add name=MYCONTAINER value=NET_ADMIN
/container/envs/add key=device name=MYCONTAINER value=/dev/net/tun

Where MYCONTAINER is the name of your container.

Indeed, advanced container network configuration (e.g. with VLAN support) is missing or not described in the documentation.
The docker engine provides a virtual network between host and containers and automatically configures it in containers, in ROS you have to do it manually (via veth with additional bridge and masquerade) it resembles the bridge network which is the primary/default in docker.
BTW I was able to add veth to VLANs on the bridge and subinterfaces to eth0 in the container with alpine linux and get addresses on them from DHCP. For this to work at all it was necessary to assign IP address and gateway in veth.

/dev/net/tun access was added in 7.5beta4 and is also included in 7.6. Your provided commands will do nothing.

It would be great to have option to nest docker in a docker, or at least have an option to mount /var/run/docker.sock

I don’t believe RouterOS is running full-fat Docker Engine. By all the signs, it’s a barebones OCI runtime, closer to crun or systemd-nspawn.

There is no API socket to be had.