No problem with file transfers in ny case. I use ‘scp’ and webfig for uploading (RB4011, ARMv7 32 bit).
Regarding the lack of interactive console shell, you have to settle for images with ssh, web config or environment variables. This is really annoying. I hope we get interactive shell soon. My kingdom for ‘docker exec -it bash‘
First I was using openwrt images (mips_24kc-21.02.0 tag on https://hub.docker.com/r/openwrtorg/rootfs) . However, I suspect something about their init system is causing the 100% cpu usage. Now I’m rolling my own images based on openwrt but without their init system.
I have just been making tarballs of the root fs and then using
adding logging=yes seems to just log stdout/stderr from inside the container, no info about debugging the container runtime itself. There is some limited debugging info available in supout.rif in the
How are you reading supout.rif? I viewed my supout.rif in mikrotik.com → account but It doesn’t contain a “container” section
EDIT: Thank you so much, finally a bit of hint of logging. I used a third party tool (github.com/farseeker/go-mikrotik-rif) to open the supout and found this.
What version are you running. I was seeing the same error on rc3 as the kernel was not built with full support for namespaces. Issue was resolved with rc4
from what i experimented so far with building a container from scratch, and trying to run it on an rb960pg (mipsbe) i can tell:
if it stucks at status extracting, there is something wrong with the container image (tar file)
if it does not start but extracts fine, container image seems ok but there is something wrong with the binaries within the container or the container was built/saved on wrong architecture.
comparing architectures, with a container built on mips64 or mipsel i get stacktrace with signal 11 (SIGSEGV - Segmentation violation)
saving the built container from a mips32 system i get signal 17 (SIGUSR2 - User-defined signal 2) stacktrace.
so not only the architecture has to match (what is clear to me), but also the build-tools have to match i guess?
i am trying to build the container on a qemu-mips (malta) VM running openwrt 21.02, which uses musl toolchain afaik.
the binaries which run fine in openwrt on mips32 seem not to work in the container on the rb960.
does anybody know what toolchain must be used for binaries in a container to run on a rb960pg (mipsbe) ?
What’s old is new again. Mikrotik was ahead of it’s time with MetaROUTER. And, yet still people wanting to run a full Linux distro with stuff PBX etc. But with MetaROUTER, the Wiki had a clear description of how to use with ROS – that’s missing in v7 Containers IMO.
Just saying ROS-on-ROS is could be simplier for stuff like VRF, and likely good example of “SDN” potential of Containers. Since there are no examples of any containers for TILE, if Mikrotik had some examples of getting ROS in a working container, that be a good place to know if anyother container could on some hardware platform.
sorry, i overlooked that comment.
many many thanks for that information! based on that i also could finally get a container to work. based on that container i built my own container.
i tried that but maybe i did something wrong because this didnt work for me, but based on the mips_24kc-21.02.0 openwrt container i could create a container myself and build it with “docker build -t mytag .” then “docker save mytag > mytag.tar” to use the tar file on the router.
so i got a working container on a rb960pgs which is really nice!
just giving feedback:
following things i noticed are not (yet) working correctly, but i guess they will be fixed in future ROS versions:
“sometimes” after stopping a container the file autosupout.rif is written and then starting a container is not possible any more until the router is rebootet. (in autosupout.rif i see signal 11 in the log)
when the container is running, after a usual reboot of the router, the container store and the tar-file/image is lost, but the configuration is still there, so i have to remove the container, upload the image and add it again.
are containers started automatically after router reboot? (assuming the previous mentioned problem is fixed)
“sometimes” i have to “/container/start number=0” more than once until the container starts correctly although nothing changed and i just uploaded the image again and re-added the container. looking in supout.rif i see signal 17 as described before.
Is it possible to get access to devices connected to the USB Bus from within Docker?
(=run Docker in piviledged mode?)
If yes, could you please post an example?
So I could interact with USB devices (IE Serial devices) from within Docker?
No, because entire point of having docker is to isolate it from rest of the ROS environment.
Maybe sharing USB block devices with docker container can be added as a feature later…
But for now you can use following workaround:
Set up serial port server(s) in ROS and then you can access your USB serial ports over TCP/IP, ie. even from the container.
As long as it’s just serial port (and not some other device that would require libusb access) it should work without problems.
I would like it if containers didn’t have to be placed behind NAT…
Please Mikrotik, at least add the ability to use host networking. others would be potentially useful but limiting us to only bridge networking limits what can be done inside a container running on a mikrotik device. https://docs.docker.com/network/#network-drivers
It uses a couple of vlans (Vlan setup currently hard coded in the tar file) on it’s veth to connect to the local networks.
It is configured as a mdns reflector.
While working out how to make it work, I used netcat from openwrt to provide a couple of cli sessions. The cli is very basic but works, (You need 2 for when you break one) Probably should learn how to setup a dropbear.
I used 7zip on my desktop to open the tar file, and edit config files, and insert the executables (netcat binary and runcat2.sh script)
It seems to work ok.
Not sure I really want it now though
having memory, there is portainer.io, should be installed as a normal docker image, and provides a simple graphical interface to install all the images you want. you can customize the run commands, extensions, ports, volumes, etc..
is it on purpose, that there is no container package for SMIPS architecture or was it just forgotten?
on all architectures i can find the container package in the all_packages-*-7.1rc4.zip file but not for SMIPS ?