Files in directory /echo in any check-in
- Containerfile
- Dockerfile
- echo.c
- Makefile
- README.md
The Containerfile
builds a single static binary
that does nothing but print its arguments (by default, “Hello, world!”)
separated by a single space on stdout and exit, like a stripped-down
version of POSIX’s /bin/echo
. Its tiny size (~8 kB uncompressed)
makes it ideal for testing that RouterOS’s container feature is
working. As such, this container is built for both ARM platforms that
ROS’s /container
feature runs on, plus 64-bit Intel.
See the Makefile
for details on building,
configuring, and running this container.
Simple Method
Start by installing the container package per MikroTik’s docs. Networking details don’t matter for this container, as it merely emits a message on stdout, but that does mean you have to have your logging set up properly. The shortest path is:
$ ssh myrouter
> /system logging
add topics=container
> /container
> add remote-image=tangentsoft/echo:latest \
interface=veth1 \
logging=yes
> start 0
Remote Tarball Method
If you need to install the container via an image tarball, the simplest way to fetch it is:
$ docker pull --platform linux/arm/v7 tangentsoft/echo:latest
$ docker image save tangentsoft/echo:latest > echo.tar
$ scp echo.tar myrouter:
That assumes you’ve got a 32-bit ARM based router such as the RB4011 and
it’s got SSH with keys set already. For 64-bit routers, change the
--platform
argument to linux/arm64
.
Source Method
You can instead build the container from this source repo:
$ fossil clone https://tangentsoft.com/mikrotik
$ cd mikrotik/echo
$ make DBFLAGS=--platform=linux/arm/v7
$ docker image save echo:latest > echo.tar
$ scp echo.tar myrouter: