v7.1rc3 adds container support

I saw the same error the first time I tried to start the container.
I checked the amount of memory I gave the CHR (128MB). I changed the amount of memeory to 1GB and after that the container seems to start.

Now I need to find out why I’m not able to connect to the GUI (172.18.0.2/admin).

Has anybody been able to get a container virtual interface to sniff network traffic? I have a container running and the application says it’s capturing but would love to figure out how to best route traffic to the interface on the CHR.

Thanks mate,
Increasing the RAM to 2GB worked for me, was quite an oversight from my side.
If your IP is routed then it should open on 172.18.0.2 I did not face any such problem,
Check if the lighthttpd service is starting in the logs

When I was at home last evening it worked for me also.

Enable SysV IPC support. Shared Memory (SHM) is not enabled and (/dev/shm) is missing

Looks like it is not enabled in the kernel:

  • kernel not configured for message queues
  • kernel not configured for semaphores
  • kernel not configured for shared memory

11:54:06 container,info,debug Filesystem Size Used Available Use% Mounted on
11:54:06 container,info,debug ubi1:RouterOS 437.1M 164.9M 267.5M 38% /
11:54:06 container,info,debug tmpfs 64.0M 0 64.0M 0% /dev

Containers using shared memory e.g. Zabbix Proxy can’t run as of now. Please enable.

https://docs.docker.com/engine/reference/run/#ipc-settings---ipc

The Linux kernel default configuration normally enables SysV IPC support. If the SysV IPC is not supported in your Linux kernel, you need to configure your kernel source with the CONFIG_SYSVIPC set to enable SysV IPC facilities. You need to rebuild your kernel after changing the configuration.

The SysV IPC facilities are widely used throughout various Linux applications. For example, some database applications create shared memory segments for data sharing. The Linux kernel dynamically allocates memory for IPC objects whenever a new IPC resource is requested.

But wouldn’t most applications have several options for this and possibly autodetect the availability during ./configure?
When you cross-compile an application for another platform you should be careful to check that this process works right, and maybe do something like:
./configure --without-sysv-ipc

Just an FYI for people running PPC devices, like the RB850Gx2 and similar, the docker sadly is not available for you.. Found that out, crushing my hopes of running pihole on a MT router.

Hi! Followed guide from 1st post of this thread. After reboot found this in logs:

And this:

Can you please tell me what I am doing wrong?

you need to create a veth interface. name=veth1 in your case apparently.

@infabo I said I followed guide from the first post, which has the following:

[admin@MikroTik] > /interface/veth/add name=veth1 address=172.17.0.2/16 gateway=172.17.0.1
[admin@MikroTik] > /interface/bridge/add name=docker
[admin@MikroTik] > /ip/address/add address=172.17.0.1/16 interface=docker
[admin@MikroTik] > /interface/bridge/port add bridge=docker interface=veth1

Do I miss smth?

DHCP Client when you didn’t create it? Maybe it’s something about Internet Detect feature?

Did not create dhcp-client by my own. I thing I use the default one. Perhaps you meant dhcp-server - I also use default one. Just changed lease time to one day.

[admin@MikroTik] > /ip/dhcp-server/print 
Columns: NAME, INTERFACE, ADDRESS-POOL, LEASE-TIME
# NAME     INTERFACE  ADDRESS-POOL  LEASE-TIME
0 defconf  bridge     default-dhcp  1d

Hi,
If it’s a Hap AC^2 (or similar units probably), it breaks the container setup on reboot.

I have a script that completely removes the container, and recreates it.
(Its not perfect, I sometimes have to run it twice)

{
/delay 1
/log info "starting iperf3 server"

/container 
remove [find file=disk1/docker/iperf.tar]

/delay 3
add envlist=iperf file=disk1/docker/iperf.tar root-dir=disk1/docker/iperf hostname=iperf interface=veth1 logging=yes cmd="iperf3 -s"

/delay 3
start  [find file=disk1/docker/iperf.tar]
/delay 3
:local iperfsts [get [find file=disk1/docker/iperf.tar] status]
/log info "iperf3 status: $iperfsts"

}

Hi!

So it’s not just me. It’s Hap AC^3.

Thanks for sharing your script.

Hi,

if someone is interested, I built containers for OLSRd V1 and OLSRd V2.
I posted it on the FunkFeuer forum (german).
All containers as also experienced information about it with used commands and scripts to properly start the containers after reboot is also mentioned.

Thanks for this awesome feature in RouterOS!

@jult:

I do not have a PPC device to test but I can not confirm.
The container package is available in 7.1rc4 for PPC too: all_packages-ppc-7.1rc4.zip
It got removed from 7.1rc5 as the changelog states.

how to edit container files? I’m trying to install a web server and want to create a php file and others, but when I edit via FTP and then I save it then I get an error “access denied”

Either rebuild the image/container or map it to persistent storage on the router.

Is it me or extra-package has no container.npk in 7.1rc6

Read other messages above. It has been dropped in rc5 and rc6. Hopefully to return later.