Wiki page
[Container Limitations] by
tangent
2024-08-05 13:25:26.
0000: 44 20 32 30 32 34 2d 30 38 2d 30 35 54 31 33 3a D 2024-08-05T13:
0010: 32 35 3a 32 36 2e 35 34 30 0a 4c 20 43 6f 6e 74 25:26.540.L Cont
0020: 61 69 6e 65 72 5c 73 4c 69 6d 69 74 61 74 69 6f ainer\sLimitatio
0030: 6e 73 0a 4e 20 74 65 78 74 2f 78 2d 6d 61 72 6b ns.N text/x-mark
0040: 64 6f 77 6e 0a 50 20 61 61 36 63 33 31 34 65 34 down.P aa6c314e4
0050: 64 64 63 63 63 62 32 38 61 31 39 62 31 32 32 65 ddcccb28a19b122e
0060: 34 63 38 38 36 33 65 66 61 61 35 65 61 63 63 32 4c8863efaa5eacc2
0070: 65 38 63 62 34 66 31 63 35 33 37 61 34 66 34 36 e8cb4f1c537a4f46
0080: 65 38 35 66 31 33 31 0a 55 20 74 61 6e 67 65 6e e85f131.U tangen
0090: 74 0a 57 20 33 34 34 36 37 0a 23 20 4d 6f 74 69 t.W 34467.# Moti
00a0: 76 61 74 69 6f 6e 0d 0a 0d 0a 54 68 65 20 5b 52 vation....The [R
00b0: 6f 75 74 65 72 4f 53 20 60 63 6f 6e 74 61 69 6e outerOS `contain
00c0: 65 72 2e 6e 70 6b 60 20 66 65 61 74 75 72 65 5d er.npk` feature]
00d0: 28 68 74 74 70 73 3a 2f 2f 68 65 6c 70 2e 6d 69 (https://help.mi
00e0: 6b 72 6f 74 69 6b 2e 63 6f 6d 2f 64 6f 63 73 2f krotik.com/docs/
00f0: 64 69 73 70 6c 61 79 2f 52 4f 53 2f 43 6f 6e 74 display/ROS/Cont
0100: 61 69 6e 65 72 29 20 69 73 20 68 69 67 68 6c 79 ainer) is highly
0110: 20 75 73 65 66 75 6c 2c 20 62 75 74 20 69 74 20 useful, but it
0120: 69 73 20 61 20 63 75 73 74 6f 6d 20 64 65 76 65 is a custom deve
0130: 6c 6f 70 6d 65 6e 74 20 77 72 69 74 74 65 6e 20 lopment written
0140: 69 6e 2d 68 6f 75 73 65 20 62 79 20 4d 69 6b 72 in-house by Mikr
0150: 6f 54 69 6b 2c 20 6e 6f 74 20 61 20 63 6f 70 79 oTik, not a copy
0160: 20 6f 66 20 44 6f 63 6b 65 72 20 45 6e 67 69 6e of Docker Engin
0170: 65 20 6f 72 20 61 6e 79 20 6f 66 20 74 68 65 20 e or any of the
0180: 6f 74 68 65 72 20 73 65 72 76 65 72 2d 67 72 61 other server-gra
0190: 64 65 20 63 6f 6e 74 61 69 6e 65 72 20 65 6e 67 de container eng
01a0: 69 6e 65 73 2e 28 5e 50 6f 64 6d 61 6e 2c 20 4c ines.(^Podman, L
01b0: 58 43 2f 4c 58 44 2c 20 65 74 63 2e 29 20 42 65 XC/LXD, etc.) Be
01c0: 63 61 75 73 65 20 6f 66 20 74 68 65 20 73 74 72 cause of the str
01d0: 69 6e 67 65 6e 74 20 72 65 73 6f 75 72 63 65 20 ingent resource
01e0: 63 6f 6e 73 74 72 61 69 6e 74 73 20 6f 6e 20 74 constraints on t
01f0: 68 65 20 62 75 6c 6b 20 6f 66 20 4d 69 6b 72 6f he bulk of Mikro
0200: 54 69 6b e2 80 99 73 20 64 65 76 69 63 65 73 2c Tik’s devices,
0210: 20 69 74 20 69 73 20 65 78 63 65 70 74 69 6f 6e it is exception
0220: 61 6c 6c 79 20 73 6d 61 6c 6c 2c 20 74 68 75 73 ally small, thus
0230: 20 75 6e 61 76 6f 69 64 61 62 6c 79 20 76 65 72 unavoidably ver
0240: 79 20 74 68 69 6e 6c 79 20 66 65 61 74 75 72 65 y thinly feature
0250: 64 20 63 6f 6d 70 61 72 65 64 20 74 6f 20 69 74 d compared to it
0260: 73 20 62 69 67 2d 62 6f 79 20 63 6f 6d 70 65 74 s big-boy compet
0270: 69 74 69 6f 6e 2e 20 49 66 20 77 65 20 63 61 6e ition. If we can
0280: 20 75 73 65 20 69 6e 73 74 61 6c 6c 65 64 20 73 use installed s
0290: 69 7a 65 20 61 73 20 61 20 70 72 6f 78 79 20 66 ize as a proxy f
02a0: 6f 72 20 65 78 70 65 63 74 65 64 20 66 65 61 74 or expected feat
02b0: 75 72 65 20 73 65 74 20 73 69 7a 65 2c 20 77 65 ure set size, we
02c0: 20 66 69 6e 64 3a 0d 0a 0d 0a 2a 20 2a 2a 44 6f find:....* **Do
02d0: 63 6b 65 72 20 45 6e 67 69 6e 65 2a 2a 3a 20 34 cker Engine**: 4
02e0: 32 32 20 4d 69 42 28 5e 56 65 72 73 69 6f 6e 20 22 MiB(^Version
02f0: 32 37 2e 31 2e 31 2c 20 61 63 63 6f 72 64 69 6e 27.1.1, accordin
0300: 67 20 74 6f 20 60 64 6e 66 20 72 65 6d 6f 76 65 g to `dnf remove
0310: 20 64 6f 63 6b 65 72 2d 63 65 e2 80 a6 60 20 61 docker-ce…` a
0320: 66 74 65 72 20 69 6e 73 74 61 6c 6c 69 6e 67 20 fter installing
0330: 74 68 65 73 65 20 70 61 63 6b 61 67 65 73 20 5b these packages [
0340: 70 65 72 20 74 68 65 20 69 6e 73 74 72 75 63 74 per the instruct
0350: 69 6f 6e 73 5d 28 68 74 74 70 73 3a 2f 2f 64 6f ions](https://do
0360: 63 73 2e 64 6f 63 6b 65 72 2e 63 6f 6d 2f 65 6e cs.docker.com/en
0370: 67 69 6e 65 2f 69 6e 73 74 61 6c 6c 2f 72 68 65 gine/install/rhe
0380: 6c 2f 23 69 6e 73 74 61 6c 6c 2d 64 6f 63 6b 65 l/#install-docke
0390: 72 2d 65 6e 67 69 6e 65 29 2e 20 4e 6f 74 65 20 r-engine). Note
03a0: 61 6c 73 6f 20 74 68 61 74 20 74 68 69 73 20 69 also that this i
03b0: 73 20 74 68 65 20 e2 80 9c 65 6e 67 69 6e 65 e2 s the “engine
03c0: 80 9d 20 61 6c 6f 6e 65 2c 20 6c 65 61 76 69 6e alone, leavin
03d0: 67 20 6f 75 74 20 74 68 65 20 65 78 74 72 61 20 g out the extra
03e0: 67 69 67 61 62 79 74 65 20 6f 66 20 73 74 75 66 gigabyte of stuf
03f0: 66 20 74 68 61 74 20 6d 61 6b 65 73 20 75 70 20 f that makes up
0400: 44 6f 63 6b 65 72 20 44 65 73 6b 74 6f 70 2e 20 Docker Desktop.
0410: 54 68 69 73 20 69 73 20 77 68 61 74 20 79 6f 75 This is what you
0420: e2 80 99 64 20 72 75 6e 20 6f 6e 20 61 20 72 65 ’d run on a re
0430: 6d 6f 74 65 20 73 65 72 76 65 72 2c 20 74 68 65 mote server, the
0440: 20 63 6c 6f 73 65 73 74 20 73 69 74 75 61 74 69 closest situati
0450: 6f 6e 20 74 6f 20 77 68 61 74 20 61 20 68 65 61 on to what a hea
0460: 64 6c 65 73 73 20 52 6f 75 74 65 72 4f 53 20 62 dless RouterOS b
0470: 6f 78 20 70 72 6f 76 69 64 65 73 2e 29 0d 0a 2a ox provides.)..*
0480: 20 2a 2a 60 63 6f 6e 74 61 69 6e 65 72 64 60 2b **`containerd`+
0490: 60 6e 65 72 64 63 74 6c 60 2a 2a 3a 20 31 37 34 `nerdctl`**: 174
04a0: 20 4d 69 42 28 5e 54 68 69 73 20 69 73 20 65 73 MiB(^This is es
04b0: 73 65 6e 74 69 61 6c 6c 79 20 44 6f 63 6b 65 72 sentially Docker
04c0: 20 45 6e 67 69 6e 65 20 6d 69 6e 75 73 20 74 68 Engine minus th
04d0: 65 20 62 75 69 6c 64 20 74 6f 6f 6c 69 6e 67 2e e build tooling.
04e0: 20 54 68 65 20 73 69 7a 65 20 69 73 20 66 6f 72 The size is for
04f0: 20 76 65 72 73 69 6f 6e 20 32 2e 30 2e 30 2d 72 version 2.0.0-r
0500: 63 31 20 6f 66 20 60 6e 65 72 64 63 74 6c 60 20 c1 of `nerdctl`
0510: 70 6c 75 73 20 74 68 65 20 60 63 6f 6e 74 61 69 plus the `contai
0520: 6e 65 72 64 60 20 66 72 6f 6d 20 74 68 65 20 44 nerd` from the D
0530: 6f 63 6b 65 72 20 45 6e 67 69 6e 65 20 43 45 20 ocker Engine CE
0540: 69 6e 73 74 61 6c 6c 20 61 62 6f 76 65 2c 20 61 install above, a
0550: 63 63 6f 72 64 69 6e 67 20 74 6f 20 60 73 75 64 ccording to `sud
0560: 6f 20 64 6e 66 20 72 65 6d 6f 76 65 20 63 6f 6e o dnf remove con
0570: 74 61 69 6e 65 72 64 60 20 61 6e 64 20 60 64 75 tainerd` and `du
0580: 20 2d 73 68 20 6e 65 72 64 63 74 6c 60 2e 29 0d -sh nerdctl`.).
0590: 0a 2a 20 2a 2a 50 6f 64 6d 61 6e 2a 2a 3a 20 31 .* **Podman**: 1
05a0: 30 37 20 4d 69 42 28 5e 56 65 72 73 69 6f 6e 20 07 MiB(^Version
05b0: 34 2e 39 2e 34 20 6f 6e 20 45 4c 39 2c 20 61 63 4.9.4 on EL9, ac
05c0: 63 6f 72 64 69 6e 67 20 74 6f 20 60 73 75 64 6f cording to `sudo
05d0: 20 64 6e 66 20 72 65 6d 6f 76 65 20 70 6f 64 6d dnf remove podm
05e0: 61 6e 20 63 6f 6e 6d 6f 6e 20 63 72 75 6e 60 2e an conmon crun`.
05f0: 29 0d 0a 2a 20 2a 2a 60 63 6f 6e 74 61 69 6e 65 )..* **`containe
0600: 72 2e 6e 70 6b 60 2a 2a 3a 20 5f 30 2e 30 36 32 r.npk`**: _0.062
0610: 36 20 4d 69 42 5f 28 5e 56 65 72 73 69 6f 6e 20 6 MiB_(^Version
0620: 37 2e 31 35 2e 32 2c 20 61 63 63 6f 72 64 69 6e 7.15.2, accordin
0630: 67 20 74 6f 20 60 2f 73 79 73 74 65 6d 2f 70 61 g to `/system/pa
0640: 63 6b 61 67 65 2f 70 72 69 6e 74 60 2e 29 0d 0a ckage/print`.)..
0650: 0d 0a 41 6e 64 20 74 68 69 73 20 69 73 20 66 69 ..And this is fi
0660: 6e 65 21 20 52 6f 75 74 65 72 4f 53 20 73 65 72 ne! RouterOS ser
0670: 76 65 73 20 61 20 70 61 72 74 69 63 75 6c 61 72 ves a particular
0680: 20 6d 61 72 6b 65 74 2c 20 61 6e 64 20 69 74 73 market, and its
0690: 20 64 65 76 65 6c 6f 70 65 72 73 20 61 72 65 20 developers are
06a0: 77 6f 72 6b 69 6e 67 20 77 69 74 68 69 6e 20 74 working within t
06b0: 68 6f 73 65 20 63 6f 6e 73 74 72 61 69 6e 74 73 hose constraints
06c0: 2e 20 54 68 65 20 69 6e 74 65 6e 74 20 68 65 72 . The intent her
06d0: 65 20 69 73 20 74 6f 20 70 72 6f 76 69 64 65 20 e is to provide
06e0: 61 20 6d 61 70 70 69 6e 67 20 62 65 74 77 65 65 a mapping betwee
06f0: 6e 20 77 68 61 74 20 70 65 6f 70 6c 65 20 65 78 n what people ex
0700: 70 65 63 74 20 6f 66 20 61 20 66 75 6c 6c 79 2d pect of a fully-
0710: 66 65 61 74 75 72 65 64 20 63 6f 6e 74 61 69 6e featured contain
0720: 65 72 20 65 6e 67 69 6e 65 20 61 6e 64 20 77 68 er engine and wh
0730: 61 74 20 79 6f 75 20 61 63 74 75 61 6c 6c 79 20 at you actually
0740: 67 65 74 20 69 6e 20 52 6f 75 74 65 72 4f 53 2e get in RouterOS.
0750: 20 57 68 65 72 65 20 69 74 20 6d 61 6b 65 73 20 Where it makes
0760: 73 65 6e 73 65 2c 20 49 20 74 72 79 20 74 6f 20 sense, I try to
0770: 70 72 6f 76 69 64 65 20 77 6f 72 6b 61 72 6f 75 provide workarou
0780: 6e 64 73 20 66 6f 72 20 6d 69 73 73 69 6e 67 20 nds for missing
0790: 66 65 61 74 75 72 65 73 20 61 6e 64 20 67 75 69 features and gui
07a0: 64 61 6e 63 65 20 74 6f 20 61 6c 74 65 72 6e 61 dance to alterna
07b0: 74 69 76 65 20 6d 65 74 68 6f 64 73 20 77 68 65 tive methods whe
07c0: 72 65 20 52 6f 75 74 65 72 4f 53 e2 80 99 73 20 re RouterOS’s
07d0: 77 61 79 20 6d 65 72 65 6c 79 20 2a 77 6f 72 6b way merely *work
07e0: 73 2a 20 64 69 66 66 65 72 65 6e 74 6c 79 2e 0d s* differently..
07f0: 0a 0d 0a 0d 0a 23 20 3c 61 20 69 64 3d 22 67 6c .....# <a id="gl
0800: 6f 62 61 6c 22 3e 3c 2f 61 3e 47 6c 6f 62 61 6c obal"></a>Global
0810: 20 4c 69 6d 69 74 61 74 69 6f 6e 73 0d 0a 0d 0a Limitations....
0820: 41 6c 6c 6f 77 20 6d 65 20 74 6f 20 62 65 67 69 Allow me to begi
0830: 6e 20 77 69 74 68 20 74 68 65 20 6d 61 6a 6f 72 n with the major
0840: 20 6c 69 6d 69 74 61 74 69 6f 6e 73 20 76 69 73 limitations vis
0850: 69 62 6c 65 20 61 74 20 61 20 67 6c 6f 62 61 6c ible at a global
0860: 20 6c 65 76 65 6c 20 69 6e 20 74 68 65 20 52 6f level in the Ro
0870: 75 74 65 72 4f 53 20 60 63 6f 6e 74 61 69 6e 65 uterOS `containe
0880: 72 2e 6e 70 6b 60 20 66 65 61 74 75 72 65 2c 20 r.npk` feature,
0890: 62 6f 74 68 20 74 6f 20 73 61 74 69 73 66 79 20 both to satisfy
08a0: 74 68 65 20 2a 2a 74 6c 3b 64 72 2a 2a 20 63 72 the **tl;dr** cr
08b0: 6f 77 64 20 61 6e 64 20 74 6f 20 73 65 74 20 62 owd and to set b
08c0: 72 6f 61 64 20 65 78 70 65 63 74 61 74 69 6f 6e road expectation
08d0: 73 20 66 6f 72 20 74 68 65 20 72 65 73 74 20 6f s for the rest o
08e0: 66 20 6d 79 20 72 65 61 64 65 72 73 2e 20 54 68 f my readers. Th
08f0: 69 73 20 73 75 70 65 72 2d 6d 69 6e 69 6d 61 6c is super-minimal
0900: 20 63 6f 6e 74 61 69 6e 65 72 20 69 6d 70 6c 65 container imple
0910: 6d 65 6e 74 61 74 69 6f 6e 20 6c 61 63 6b 73 3a mentation lacks:
0920: 0d 0a 0d 0a 2a 20 20 20 6f 72 63 68 65 73 74 72 ....* orchestr
0930: 61 74 69 6f 6e 0d 0a 2a 20 20 20 69 6d 61 67 65 ation..* image
0940: 20 62 75 69 6c 64 69 6e 67 0d 0a 2a 20 20 20 61 building..* a
0950: 20 6c 6f 63 61 6c 20 69 6d 61 67 65 20 63 61 63 local image cac
0960: 68 65 0d 0a 2a 20 20 20 4a 53 4f 4e 20 61 6e 64 he..* JSON and
0970: 20 52 45 53 54 20 41 50 49 73 0d 0a 2a 20 20 20 REST APIs..*
0980: 61 20 5b 43 6f 57 5d 2f 6f 76 65 72 6c 61 79 20 a [CoW]/overlay
0990: 66 69 6c 65 20 73 79 73 74 65 6d 28 5e 54 68 69 file system(^Thi
09a0: 73 20 69 73 20 6e 6f 74 20 61 20 76 65 72 69 66 s is not a verif
09b0: 69 65 64 20 66 61 63 74 2c 20 62 75 74 20 61 6e ied fact, but an
09c0: 20 69 6e 66 65 72 65 6e 63 65 20 62 61 73 65 64 inference based
09d0: 20 6f 6e 20 74 68 65 20 6f 62 73 65 72 76 61 74 on the observat
09e0: 69 6f 6e 20 74 68 61 74 20 69 66 20 52 6f 75 74 ion that if Rout
09f0: 65 72 4f 53 20 5f 64 69 64 5f 20 68 61 76 65 20 erOS _did_ have
0a00: 74 68 69 73 20 66 61 63 69 6c 69 74 79 20 75 6e this facility un
0a10: 64 65 72 6c 79 69 6e 67 20 69 74 73 20 63 6f 6e derlying its con
0a20: 74 61 69 6e 65 72 73 2c 20 73 65 76 65 72 61 6c tainers, several
0a30: 20 6f 74 68 65 72 20 6c 69 6d 69 74 61 74 69 6f other limitatio
0a40: 6e 73 20 63 6f 76 65 72 65 64 20 68 65 72 65 20 ns covered here
0a50: 77 6f 75 6c 64 20 6e 6f 74 20 65 78 69 73 74 2e would not exist.
0a60: 29 0d 0a 2a 20 20 20 70 65 72 2d 63 6f 6e 74 61 )..* per-conta
0a70: 69 6e 65 72 20 6c 69 6d 69 74 20 63 6f 6e 74 72 iner limit contr
0a80: 6f 6c 73 3a 28 5e 54 68 65 20 6f 6e 6c 79 20 63 ols:(^The only c
0a90: 6f 6e 66 69 67 75 72 61 62 6c 65 20 72 65 73 6f onfigurable reso
0aa0: 75 72 63 65 20 6c 69 6d 69 74 20 69 73 20 6f 6e urce limit is on
0ab0: 20 6d 61 78 69 6d 75 6d 20 52 41 4d 20 75 73 61 maximum RAM usa
0ac0: 67 65 2c 20 61 6e 64 20 69 74 e2 80 99 73 20 67 ge, and it’s g
0ad0: 6c 6f 62 61 6c 2c 20 6e 6f 74 20 73 65 74 74 61 lobal, not setta
0ae0: 62 6c 65 20 6f 6e 20 61 20 70 65 72 2d 63 6f 6e ble on a per-con
0af0: 74 61 69 6e 65 72 20 62 61 73 69 73 2e 29 0d 0a tainer basis.)..
0b00: 20 20 20 20 2a 20 20 20 46 44 20 63 6f 75 6e 74 * FD count
0b10: 0d 0a 20 20 20 20 2a 20 20 20 50 49 44 20 6c 69 .. * PID li
0b20: 6d 69 74 0d 0a 20 20 20 20 2a 20 20 20 43 50 55 mit.. * CPU
0b30: 20 75 73 61 67 65 0d 0a 20 20 20 20 2a 20 20 20 usage.. *
0b40: 73 74 6f 72 61 67 65 20 49 4f 50 53 0d 0a 20 20 storage IOPS..
0b50: 20 20 2a 20 20 20 60 2f 64 65 76 2f 73 68 6d 60 * `/dev/shm`
0b60: 20 73 69 7a 65 20 6c 69 6d 69 74 0d 0a 20 20 20 size limit..
0b70: 20 2a 20 20 20 74 65 72 6d 69 6e 61 6c 2f 6c 6f * terminal/lo
0b80: 67 67 69 6e 67 20 62 70 73 0d 0a 20 20 20 20 2a gging bps.. *
0b90: 20 20 20 5b 63 61 70 61 62 69 6c 69 74 79 5d 5b [capability][
0ba0: 63 61 70 73 5d 20 72 65 73 74 72 69 63 74 69 6f caps] restrictio
0bb0: 6e 73 0d 0a 20 20 20 20 2a 20 20 20 5b 73 65 63 ns.. * [sec
0bc0: 63 6f 6d 70 20 70 72 6f 66 69 6c 65 73 5d 28 68 comp profiles](h
0bd0: 74 74 70 73 3a 2f 2f 64 6f 63 73 2e 64 6f 63 6b ttps://docs.dock
0be0: 65 72 2e 63 6f 6d 2f 65 6e 67 69 6e 65 2f 73 65 er.com/engine/se
0bf0: 63 75 72 69 74 79 2f 73 65 63 63 6f 6d 70 2f 29 curity/seccomp/)
0c00: 0d 0a 20 20 20 20 2a 20 20 20 5b 72 6c 69 6d 69 .. * [rlimi
0c10: 74 5d 0d 0a 2a 20 20 20 68 61 72 64 77 61 72 65 t]..* hardware
0c20: 20 70 61 73 73 2d 74 68 72 75 3a 0d 0a 20 20 20 pass-thru:..
0c30: 20 2a 20 20 20 55 53 42 20 64 65 76 69 63 65 20 * USB device
0c40: 65 6e 74 72 69 65 73 20 75 6e 64 65 72 20 60 2f entries under `/
0c50: 64 65 76 60 20 61 72 65 20 6f 6e 20 74 68 65 20 dev` are on the
0c60: 77 69 73 68 20 6c 69 73 74 2c 20 62 75 74 20 6e wish list, but n
0c70: 6f 74 20 63 75 72 72 65 6e 74 6c 79 20 61 76 61 ot currently ava
0c80: 69 6c 61 62 6c 65 2e 28 5e 4e 6f 74 20 75 6e 6c ilable.(^Not unl
0c90: 65 73 73 20 52 6f 75 74 65 72 4f 53 20 69 74 73 ess RouterOS its
0ca0: 65 6c 66 20 73 65 65 73 20 74 68 65 20 55 53 42 elf sees the USB
0cb0: 20 64 65 76 69 63 65 2c 20 61 73 20 77 69 74 68 device, as with
0cc0: 20 73 74 6f 72 61 67 65 20 6d 65 64 69 61 2c 20 storage media,
0cd0: 77 68 69 63 68 20 79 6f 75 20 63 61 6e 20 62 69 which you can bi
0ce0: 6e 64 2d 6d 6f 75 6e 74 20 69 6e 74 6f 20 74 68 nd-mount into th
0cf0: 65 20 63 6f 6e 74 61 69 6e 65 72 20 77 69 74 68 e container with
0d00: 20 e2 80 9c 60 2f 63 6f 6e 74 61 69 6e 65 72 2f “`/container/
0d10: 61 64 64 20 6d 6f 75 6e 74 73 3d e2 80 a6 60 e2 add mounts=…`
0d20: 80 9d 2e 29 0d 0a 20 20 20 20 2a 20 20 20 54 68 .).. * Th
0d30: 65 72 65 20 69 73 20 6e 6f 20 47 50 55 20 73 75 ere is no GPU su
0d40: 70 70 6f 72 74 2c 20 6e 6f 74 20 65 76 65 6e 20 pport, not even
0d50: 66 6f 72 20 62 61 72 65 2d 6d 65 74 61 6c 20 78 for bare-metal x
0d60: 38 36 20 69 6e 73 74 61 6c 6c 73 2e 0d 0a 0d 0a 86 installs.....
0d70: 4c 61 63 6b 20 6f 66 20 61 20 6d 61 6e 61 67 65 Lack of a manage
0d80: 6d 65 6e 74 20 64 61 65 6d 6f 6e 28 5e 60 63 6f ment daemon(^`co
0d90: 6e 74 61 69 6e 65 72 64 60 20 69 6e 20 6d 6f 64 ntainerd` in mod
0da0: 65 72 6e 20 73 65 74 75 70 73 2c 20 60 64 6f 63 ern setups, `doc
0db0: 6b 65 72 64 60 20 69 6e 20 6f 6c 64 20 6f 6e 65 kerd` in old one
0dc0: 73 29 20 69 73 20 6e 6f 74 20 69 6e 20 74 68 61 s) is not in tha
0dd0: 74 20 6c 69 73 74 20 62 65 63 61 75 73 65 20 61 t list because a
0de0: 20 67 6f 6f 64 20 62 69 74 20 6f 66 20 44 6f 63 good bit of Doc
0df0: 6b 65 72 e2 80 99 73 20 63 6f 6d 70 65 74 69 74 ker’s competit
0e00: 69 6f 6e 20 61 6c 73 6f 20 6c 61 63 6b 73 20 74 ion also lacks t
0e10: 68 69 73 2c 20 6f 6e 20 70 75 72 70 6f 73 65 2e his, on purpose.
0e20: 20 42 65 74 77 65 65 6e 20 74 68 61 74 20 61 6e Between that an
0e30: 64 20 74 68 65 20 6f 74 68 65 72 20 69 74 65 6d d the other item
0e40: 73 20 6f 6e 20 74 68 65 20 6c 69 73 74 2c 20 74 s on the list, t
0e50: 68 65 20 66 61 69 72 65 73 74 20 63 6f 6d 70 61 he fairest compa
0e60: 72 69 73 6f 6e 20 69 73 20 6e 6f 74 20 74 6f 20 rison is not to
0e70: 66 75 6c 6c 79 2d 66 65 61 74 75 72 65 64 20 63 fully-featured c
0e80: 6f 6e 74 61 69 6e 65 72 20 2a 65 6e 67 69 6e 65 ontainer *engine
0e90: 73 2a 20 6c 69 6b 65 20 44 6f 63 6b 65 72 20 61 s* like Docker a
0ea0: 6e 64 20 50 6f 64 6d 61 6e 20 62 75 74 20 74 6f nd Podman but to
0eb0: 20 74 68 65 20 63 6f 6e 74 61 69 6e 65 72 20 2a the container *
0ec0: 72 75 6e 6e 65 72 2a 20 61 74 20 74 68 65 69 72 runner* at their
0ed0: 20 68 65 61 72 74 3a 0d 0a 0d 0a 2a 20 2a 2a 72 heart:....* **r
0ee0: 75 6e 63 2a 2a 3a 20 31 34 c2 a0 4d 69 42 28 5e unc**: 14 MiB(^
0ef0: 54 68 69 73 20 69 73 20 74 68 65 20 72 75 6e 6e This is the runn
0f00: 65 72 20 75 6e 64 65 72 70 69 6e 6e 69 6e 67 20 er underpinning
0f10: 60 63 6f 6e 74 61 69 6e 65 72 64 60 2c 20 74 68 `containerd`, th
0f20: 75 73 20 61 6c 73 6f 20 44 6f 63 6b 65 72 2c 20 us also Docker,
0f30: 61 6c 74 68 6f 75 67 68 20 69 74 20 70 72 65 63 although it prec
0f40: 65 64 65 73 20 69 74 2e 20 4c 6f 6e 67 20 62 65 edes it. Long be
0f50: 66 6f 72 65 20 74 68 65 79 20 63 72 65 61 74 65 fore they create
0f60: 64 20 60 63 6f 6e 74 61 69 6e 65 72 64 60 2c 20 d `containerd`,
0f70: 69 74 20 75 6e 64 65 72 70 69 6e 6e 65 64 20 60 it underpinned `
0f80: 64 6f 63 6b 65 72 64 60 20 69 6e 73 74 65 61 64 dockerd` instead
0f90: 2e 20 42 65 63 61 75 73 65 20 69 74 20 69 73 20 . Because it is
0fa0: 73 6f 20 70 72 69 6d 6f 72 64 69 61 6c 2c 20 61 so primordial, a
0fb0: 20 67 6f 6f 64 20 6d 61 6e 79 20 6f 74 68 65 72 good many other
0fc0: 20 63 6f 6e 74 61 69 6e 65 72 20 65 6e 67 69 6e container engin
0fd0: 65 73 20 61 72 65 20 61 6c 73 6f 20 62 61 73 65 es are also base
0fe0: 64 20 6f 6e 20 69 74 2e 29 0d 0a 2a 20 2a 2a 73 d on it.)..* **s
0ff0: 79 73 74 65 6d 64 2d 6e 73 70 61 77 6e 2a 2a 3a ystemd-nspawn**:
1000: 20 31 2e 33 c2 a0 4d 69 42 28 5e 5b 54 68 69 73 1.3 MiB(^[This
1010: 5d 5b 73 64 6e 73 70 5d 20 69 73 20 74 68 65 20 ][sdnsp] is the
1020: 62 61 72 65 2d 62 6f 6e 65 73 20 5b 4f 43 49 5d bare-bones [OCI]
1030: 20 69 6d 61 67 65 20 72 75 6e 6e 65 72 20 62 75 image runner bu
1040: 69 6c 74 20 69 6e 74 6f 20 73 79 73 74 65 6d 64 ilt into systemd
1050: 2c 20 77 69 74 68 20 61 20 66 65 61 74 75 72 65 , with a feature
1060: 20 73 65 74 20 66 61 69 72 6c 79 20 63 6c 6f 73 set fairly clos
1070: 65 20 74 6f 20 74 68 61 74 20 6f 66 20 60 63 6f e to that of `co
1080: 6e 74 61 69 6e 65 72 2e 6e 70 6b 60 2e 20 54 68 ntainer.npk`. Th
1090: 65 20 73 69 7a 65 20 61 62 6f 76 65 20 69 73 20 e size above is
10a0: 66 6f 72 20 76 65 72 73 69 6f 6e 20 32 35 32 20 for version 252
10b0: 6f 66 20 74 68 69 73 20 70 72 6f 67 72 61 6d e2 of this program
10c0: 80 99 73 20 70 61 72 65 6e 74 20 5b 60 73 79 73 s parent [`sys
10d0: 74 65 6d 64 2d 63 6f 6e 74 61 69 6e 65 72 60 5d temd-container`]
10e0: 5b 73 64 63 6e 74 5d 20 70 61 63 6b 61 67 65 20 [sdcnt] package
10f0: 61 73 20 73 68 69 70 70 65 64 20 6f 6e 20 45 4c as shipped on EL
1100: 39 2e 29 0d 0a 2a 20 2a 2a 63 72 75 6e 2a 2a 3a 9.)..* **crun**:
1110: 20 30 2e 35 c2 a0 4d 69 42 28 5e 54 68 69 73 20 0.5 MiB(^This
1120: 69 73 20 50 6f 64 6d 61 6e e2 80 99 73 20 61 6c is Podman’s al
1130: 74 65 72 6e 61 74 69 76 65 20 74 6f 20 60 72 75 ternative to `ru
1140: 6e 63 60 2c 20 77 72 69 74 74 65 6e 20 69 6e 20 nc`, written in
1150: 43 20 74 6f 20 6d 61 6b 65 20 69 74 20 73 6d 61 C to make it sma
1160: 6c 6c 65 72 2e 20 45 61 72 6c 79 20 76 65 72 73 ller. Early vers
1170: 69 6f 6e 73 20 6f 66 20 50 6f 64 6d 61 6e 20 6f ions of Podman o
1180: 6e 63 65 20 72 65 6c 69 65 64 20 6f 6e 20 60 72 nce relied on `r
1190: 75 6e 63 60 2c 20 61 6e 64 20 69 74 20 63 61 6e unc`, and it can
11a0: 20 73 74 69 6c 6c 20 62 65 20 63 6f 6e 66 69 67 still be config
11b0: 75 72 65 64 20 74 6f 20 75 73 65 20 69 74 2c 20 ured to use it,
11c0: 62 75 74 20 74 68 65 20 6e 65 77 20 64 65 66 61 but the new defa
11d0: 75 6c 74 20 69 73 20 74 6f 20 75 73 65 20 74 68 ult is to use th
11e0: 65 20 73 6c 69 6d 6d 65 72 20 62 75 74 20 66 65 e slimmer but fe
11f0: 61 74 75 72 65 2d 65 71 75 69 76 61 6c 65 6e 74 ature-equivalent
1200: 20 60 63 72 75 6e 60 2e 29 0d 0a 0d 0a 4f 6e 65 `crun`.)....One
1210: 20 72 65 61 73 6f 6e 20 60 63 6f 6e 74 61 69 6e reason `contain
1220: 65 72 2e 6e 70 6b 60 20 69 73 20 66 61 72 20 73 er.npk` is far s
1230: 6d 61 6c 6c 65 72 20 74 68 61 6e 20 65 76 65 6e maller than even
1240: 20 74 68 65 20 73 6d 61 6c 6c 65 73 74 20 6f 66 the smallest of
1250: 20 74 68 65 73 65 20 72 75 6e 6e 65 72 73 20 69 these runners i
1260: 73 20 74 68 61 74 20 74 68 65 20 65 6e 67 69 6e s that the engin
1270: 65 73 20 64 65 6c 65 67 61 74 65 20 6d 75 63 68 es delegate much
1280: 20 6f 66 20 77 68 61 74 20 52 6f 75 74 65 72 4f of what RouterO
1290: 53 20 6c 61 63 6b 73 20 74 6f 20 74 68 65 20 72 S lacks to the r
12a0: 75 6e 6e 65 72 2c 20 73 6f 20 74 68 61 74 20 65 unner, so that e
12b0: 76 65 6e 20 74 68 65 6e 20 69 74 e2 80 99 73 20 ven then it’s
12c0: 61 6e 20 75 6e 62 61 6c 61 6e 63 65 64 20 63 6f an unbalanced co
12d0: 6d 70 61 72 69 73 6f 6e 2e 20 54 68 65 20 5b 60 mparison. The [`
12e0: 6b 69 6c 6c 60 5d 28 23 6b 69 6c 6c 29 2c 20 5b kill`](#kill), [
12f0: 60 70 73 60 5d 28 23 70 73 29 2c 20 61 6e 64 20 `ps`](#ps), and
1300: 5b 60 70 61 75 73 65 60 5d 28 23 70 61 75 73 65 [`pause`](#pause
1310: 29 20 63 6f 6d 6d 61 6e 64 73 20 6d 69 73 73 69 ) commands missi
1320: 6e 67 20 66 72 6f 6d 20 60 63 6f 6e 74 61 69 6e ng from `contain
1330: 65 72 2e 6e 70 6b 60 20 61 72 65 20 70 72 6f 76 er.npk` are prov
1340: 69 64 65 64 20 69 6e 20 44 6f 63 6b 65 72 20 45 ided in Docker E
1350: 6e 67 69 6e 65 20 77 61 79 20 64 6f 77 6e 20 61 ngine way down a
1360: 74 20 74 68 65 20 60 72 75 6e 63 60 20 6c 65 76 t the `runc` lev
1370: 65 6c 2c 20 6e 6f 74 20 75 70 20 61 74 20 74 68 el, not up at th
1380: 65 20 74 6f 70 2d 6c 65 76 65 6c 20 43 4c 49 2e e top-level CLI.
1390: 0d 0a 0d 0a 57 69 74 68 20 74 68 69 73 20 67 72 ....With this gr
13a0: 6f 75 6e 64 69 6e 67 2c 20 6c 65 74 20 75 73 20 ounding, let us
13b0: 64 69 76 65 20 69 6e 74 6f 20 74 68 65 20 64 65 dive into the de
13c0: 74 61 69 6c 73 2e 0d 0a 0d 0a 5b 63 61 70 73 5d tails.....[caps]
13d0: 3a 20 20 20 68 74 74 70 73 3a 2f 2f 77 77 77 2e : https://www.
13e0: 6d 61 6e 37 2e 6f 72 67 2f 6c 69 6e 75 78 2f 6d man7.org/linux/m
13f0: 61 6e 2d 70 61 67 65 73 2f 6d 61 6e 37 2f 63 61 an-pages/man7/ca
1400: 70 61 62 69 6c 69 74 69 65 73 2e 37 2e 68 74 6d pabilities.7.htm
1410: 6c 0d 0a 5b 43 6f 57 5d 3a 20 20 20 20 68 74 74 l..[CoW]: htt
1420: 70 73 3a 2f 2f 65 6e 2e 77 69 6b 69 70 65 64 69 ps://en.wikipedi
1430: 61 2e 6f 72 67 2f 77 69 6b 69 2f 43 6f 70 79 2d a.org/wiki/Copy-
1440: 6f 6e 2d 77 72 69 74 65 0d 0a 5b 4f 43 49 5d 3a on-write..[OCI]:
1450: 20 20 20 20 68 74 74 70 73 3a 2f 2f 6f 70 65 6e https://open
1460: 63 6f 6e 74 61 69 6e 65 72 73 2e 6f 72 67 2f 0d containers.org/.
1470: 0a 5b 72 6c 69 6d 69 74 5d 3a 20 68 74 74 70 73 .[rlimit]: https
1480: 3a 2f 2f 77 77 77 2e 6d 61 6e 37 2e 6f 72 67 2f ://www.man7.org/
1490: 6c 69 6e 75 78 2f 6d 61 6e 2d 70 61 67 65 73 2f linux/man-pages/
14a0: 6d 61 6e 32 2f 67 65 74 72 6c 69 6d 69 74 2e 32 man2/getrlimit.2
14b0: 2e 68 74 6d 6c 0d 0a 5b 73 64 63 6e 74 5d 3a 20 .html..[sdcnt]:
14c0: 20 68 74 74 70 73 3a 2f 2f 70 61 63 6b 61 67 65 https://package
14d0: 73 2e 66 65 64 6f 72 61 70 72 6f 6a 65 63 74 2e s.fedoraproject.
14e0: 6f 72 67 2f 70 6b 67 73 2f 73 79 73 74 65 6d 64 org/pkgs/systemd
14f0: 2f 73 79 73 74 65 6d 64 2d 63 6f 6e 74 61 69 6e /systemd-contain
1500: 65 72 2f 0d 0a 5b 73 64 6e 73 70 5d 3a 20 20 68 er/..[sdnsp]: h
1510: 74 74 70 73 3a 2f 2f 77 69 6b 69 2e 61 72 63 68 ttps://wiki.arch
1520: 6c 69 6e 75 78 2e 6f 72 67 2f 74 69 74 6c 65 2f linux.org/title/
1530: 53 79 73 74 65 6d 64 2d 6e 73 70 61 77 6e 0d 0a Systemd-nspawn..
1540: 0d 0a 0d 0a 23 23 20 3c 61 20 69 64 3d 22 63 72 ....## <a id="cr
1550: 65 61 74 65 22 20 6e 61 6d 65 3d 22 6c 6f 61 64 eate" name="load
1560: 22 3e 3c 2f 61 3e 43 6f 6e 74 61 69 6e 65 72 20 "></a>Container
1570: 43 72 65 61 74 69 6f 6e 0d 0a 0d 0a 54 68 65 20 Creation....The
1580: 73 69 6e 67 6c 65 20 62 69 67 67 65 73 74 20 61 single biggest a
1590: 72 65 61 20 6f 66 20 64 69 66 66 65 72 65 6e 63 rea of differenc
15a0: 65 20 62 65 74 77 65 65 6e 20 74 68 65 20 6c 69 e between the li
15b0: 6b 65 73 20 6f 66 20 44 6f 63 6b 65 72 20 61 6e kes of Docker an
15c0: 64 20 74 68 65 20 52 6f 75 74 65 72 4f 53 20 60 d the RouterOS `
15d0: 63 6f 6e 74 61 69 6e 65 72 2e 6e 70 6b 60 20 66 container.npk` f
15e0: 65 61 74 75 72 65 20 69 73 20 68 6f 77 20 79 6f eature is how yo
15f0: 75 20 63 72 65 61 74 65 20 63 6f 6e 74 61 69 6e u create contain
1600: 65 72 73 20 66 72 6f 6d 20 5b 4f 43 49 5d 20 69 ers from [OCI] i
1610: 6d 61 67 65 73 2e 20 49 74 20 63 6f 6d 62 69 6e mages. It combin
1620: 65 73 20 44 6f 63 6b 65 72 e2 80 99 73 20 60 63 es Docker’s `c
1630: 72 65 61 74 65 60 20 61 6e 64 20 60 6c 6f 61 64 reate` and `load
1640: 60 20 63 6f 6d 6d 61 6e 64 73 20 75 6e 64 65 72 ` commands under
1650: 20 60 2f 63 6f 6e 74 61 69 6e 65 72 2f 61 64 64 `/container/add
1660: 60 2c 20 74 68 65 20 64 69 73 74 69 6e 63 74 69 `, the distincti
1670: 6f 6e 20 65 78 70 72 65 73 73 65 64 20 62 79 20 on expressed by
1680: 77 68 65 74 68 65 72 20 79 6f 75 20 67 69 76 65 whether you give
1690: 20 69 74 20 74 68 65 20 60 72 65 6d 6f 74 65 2d it the `remote-
16a0: 69 6d 61 67 65 60 20 6f 72 20 60 66 69 6c 65 60 image` or `file`
16b0: 20 6f 70 74 69 6f 6e 2c 20 72 65 73 70 65 63 74 option, respect
16c0: 69 76 65 6c 79 2e 0d 0a 0d 0a 47 69 76 65 6e 20 ively.....Given
16d0: 74 68 65 20 73 69 7a 65 20 6f 66 20 74 68 65 20 the size of the
16e0: 6f 75 74 70 75 74 20 66 72 6f 6d 20 60 64 6f 63 output from `doc
16f0: 6b 65 72 20 63 72 65 61 74 65 20 2d 2d 68 65 6c ker create --hel
1700: 70 60 2c 20 69 74 20 73 68 6f 75 6c 64 20 6e 6f p`, it should no
1710: 74 20 62 65 20 73 75 72 70 72 69 73 69 6e 67 20 t be surprising
1720: 74 68 61 74 20 74 68 65 20 62 75 6c 6b 20 6f 66 that the bulk of
1730: 20 74 68 61 74 20 69 73 20 65 69 74 68 65 72 20 that is either
1740: 6e 6f 74 20 61 76 61 69 6c 61 62 6c 65 20 69 6e not available in
1750: 20 52 6f 75 74 65 72 4f 53 20 6f 72 20 65 78 69 RouterOS or exi
1760: 73 74 73 20 69 6e 20 61 20 76 65 72 79 20 64 69 sts in a very di
1770: 66 66 65 72 65 6e 74 20 66 6f 72 6d 2e 20 4d 6f fferent form. Mo
1780: 73 74 20 6f 66 20 74 68 65 73 65 20 6c 69 6d 69 st of these limi
1790: 74 61 74 69 6f 6e 73 20 73 74 65 6d 20 66 72 6f tations stem fro
17a0: 6d 20 5b 74 68 65 20 6c 69 73 74 20 61 62 6f 76 m [the list abov
17b0: 65 5d 28 23 67 6c 6f 62 61 6c 29 2e 20 46 6f 72 e](#global). For
17c0: 20 69 6e 73 74 61 6e 63 65 2c 20 74 68 65 20 6c instance, the l
17d0: 61 63 6b 20 6f 66 20 61 6e 79 20 43 50 55 20 75 ack of any CPU u
17e0: 73 61 67 65 20 6c 69 6d 69 74 20 66 65 61 74 75 sage limit featu
17f0: 72 65 73 20 6d 65 61 6e 73 20 74 68 65 72 65 20 res means there
1800: 69 73 20 6e 6f 20 65 71 75 69 76 61 6c 65 6e 74 is no equivalent
1810: 20 75 6e 64 65 72 20 60 2f 63 6f 6e 74 61 69 6e under `/contain
1820: 65 72 60 20 66 6f 72 20 74 68 65 20 73 65 76 65 er` for the seve
1830: 72 61 6c 20 60 64 6f 63 6b 65 72 20 63 72 65 61 ral `docker crea
1840: 74 65 20 2d 2d 63 70 75 2a 60 20 6f 70 74 69 6f te --cpu*` optio
1850: 6e 73 2e 20 52 61 74 68 65 72 20 74 68 61 6e 20 ns. Rather than
1860: 67 6f 20 69 6e 74 6f 20 74 68 65 73 65 20 6f 70 go into these op
1870: 74 69 6f 6e 73 20 6f 6e 65 20 62 79 20 6f 6e 65 tions one by one
1880: 2c 20 49 e2 80 99 6c 6c 20 63 6f 76 65 72 20 74 , I’ll cover t
1890: 68 65 20 6f 6e 65 73 20 77 68 65 72 65 20 74 68 he ones where th
18a0: 65 20 61 6e 73 77 65 72 73 20 63 61 6e 6e 6f 74 e answers cannot
18b0: 20 62 65 20 67 6c 65 61 6e 65 64 20 74 68 72 6f be gleaned thro
18c0: 75 67 68 20 61 20 63 61 72 65 66 75 6c 20 72 65 ugh a careful re
18d0: 61 64 69 6e 67 20 6f 66 20 74 68 65 20 72 65 73 ading of the res
18e0: 74 20 6f 66 20 74 68 69 73 20 61 72 74 69 63 6c t of this articl
18f0: 65 3a 0d 0a 0d 0a 2a 20 20 20 2a 2a 60 2d 2d 65 e:....* **`--e
1900: 6e 76 60 2a 2a 3a 20 54 68 65 20 65 71 75 69 76 nv`**: The equiv
1910: 61 6c 65 6e 74 20 69 73 20 74 68 69 73 20 52 6f alent is this Ro
1920: 75 74 65 72 4f 53 20 63 6f 6d 6d 61 6e 64 20 70 uterOS command p
1930: 61 69 72 3a 0d 0a 0d 0a 20 20 20 20 20 20 20 20 air:....
1940: 2f 63 6f 6e 74 61 69 6e 65 72 2f 65 6e 76 73 2f /container/envs/
1950: 61 64 64 20 6e 61 6d 65 3d 4e 41 4d 45 20 e2 80 add name=NAME
1960: a6 0d 0a 20 20 20 20 20 20 20 20 2f 63 6f 6e 74 .. /cont
1970: 61 69 6e 65 72 2f 61 64 64 20 65 6e 76 6c 69 73 ainer/add envlis
1980: 74 3d 4e 41 4d 45 20 e2 80 a6 0d 0a 0d 0a 20 20 t=NAME …....
1990: 20 20 54 68 69 73 20 69 73 20 69 6e 20 66 61 63 This is in fac
19a0: 74 20 63 6c 6f 73 65 72 20 74 6f 20 74 68 65 20 t closer to the
19b0: 77 61 79 20 74 68 65 20 2a 2a 60 2d 2d 65 6e 76 way the **`--env
19c0: 2d 66 69 6c 65 60 2a 2a 20 6f 70 74 69 6f 6e 20 -file`** option
19d0: 77 6f 72 6b 73 2c 20 65 78 63 65 70 74 20 74 68 works, except th
19e0: 61 74 20 75 6e 64 65 72 20 52 6f 75 74 65 72 4f at under RouterO
19f0: 53 2c 20 74 68 69 73 20 70 61 72 74 69 63 75 6c S, this particul
1a00: 61 72 20 e2 80 9c 66 69 6c 65 e2 80 9d 20 69 73 ar “file” is
1a10: 6e e2 80 99 74 20 73 74 6f 72 65 64 20 75 6e 64 n’t stored und
1a20: 65 72 20 60 2f 66 69 6c 65 60 21 0d 0a 0d 0a 2a er `/file`!....*
1a30: 20 20 20 2a 2a 60 2d 2d 65 78 70 6f 73 65 60 2f **`--expose`/
1a40: 60 2d 2d 70 75 62 6c 69 73 68 60 2a 2a 3a 20 3c `--publish`**: <
1a50: 61 20 69 64 3d 22 70 75 62 6c 69 73 68 22 3e 3c a id="publish"><
1a60: 2f 61 3e 54 68 65 20 56 45 54 48 20 79 6f 75 20 /a>The VETH you
1a70: 61 74 74 61 63 68 20 74 68 65 20 63 6f 6e 74 61 attach the conta
1a80: 69 6e 65 72 20 74 6f 20 6d 61 6b 65 73 20 65 76 iner to makes ev
1a90: 65 72 79 20 6c 69 73 74 65 6e 69 6e 67 20 73 6f ery listening so
1aa0: 63 6b 65 74 20 76 69 73 69 62 6c 65 20 62 79 20 cket visible by
1ab0: 64 65 66 61 75 6c 74 2e 20 49 74 20 69 73 20 6c default. It is l
1ac0: 65 66 74 20 75 70 20 74 6f 20 79 6f 75 20 74 6f eft up to you to
1ad0: 20 6d 61 6e 75 61 6c 6c 79 20 62 6c 6f 63 6b 20 manually block
1ae0: 6f 66 66 20 61 6e 79 74 68 69 6e 67 20 65 78 70 off anything exp
1af0: 6f 73 65 64 20 61 67 61 69 6e 73 74 20 79 6f 75 osed against you
1b00: 72 20 77 69 73 68 65 73 20 62 79 20 75 73 65 20 r wishes by use
1b10: 6f 66 20 60 2f 69 70 2f 66 69 72 65 77 61 6c 6c of `/ip/firewall
1b20: 2f 66 69 6c 74 65 72 60 20 63 6f 6d 6d 61 6e 64 /filter` command
1b30: 73 2e 0d 0a 0d 0a 2a 20 20 20 2a 2a 60 2d 2d 68 s.....* **`--h
1b40: 65 61 6c 74 68 2d 63 6d 64 60 2a 2a 3a 20 42 65 ealth-cmd`**: Be
1b50: 63 61 75 73 65 20 68 65 61 6c 74 68 2d 63 68 65 cause health-che
1b60: 63 6b 73 20 61 72 65 20 6f 66 74 65 6e 20 69 6d cks are often im
1b70: 70 6c 65 6d 65 6e 74 65 64 20 62 79 20 70 65 72 plemented by per
1b80: 69 6f 64 69 63 20 41 50 49 20 63 61 6c 6c 73 20 iodic API calls
1b90: 74 6f 20 76 65 72 69 66 79 20 74 68 61 74 20 74 to verify that t
1ba0: 68 65 20 63 6f 6e 74 61 69 6e 65 72 20 63 6f 6e he container con
1bb0: 74 69 6e 75 65 73 20 74 6f 20 72 75 6e 20 70 72 tinues to run pr
1bc0: 6f 70 65 72 6c 79 2c 20 74 68 65 20 6c 6f 67 69 operly, the logi
1bd0: 63 61 6c 20 65 71 75 69 76 61 6c 65 6e 74 20 75 cal equivalent u
1be0: 6e 64 65 72 20 52 6f 75 74 65 72 4f 53 20 69 73 nder RouterOS is
1bf0: 20 74 6f 20 5b 73 63 72 69 70 74 5d 20 63 61 6c to [script] cal
1c00: 6c 73 20 74 6f 20 5b 60 2f 66 65 74 63 68 60 5d ls to [`/fetch`]
1c10: 28 68 74 74 70 73 3a 2f 2f 68 65 6c 70 2e 6d 69 (https://help.mi
1c20: 6b 72 6f 74 69 6b 2e 63 6f 6d 2f 64 6f 63 73 2f krotik.com/docs/
1c30: 64 69 73 70 6c 61 79 2f 52 4f 53 2f 46 65 74 63 display/ROS/Fetc
1c40: 68 29 2c 20 77 68 69 63 68 20 74 68 65 6e 20 69 h), which then i
1c50: 73 73 75 65 73 20 60 2f 63 6f 6e 74 61 69 6e 65 ssues `/containe
1c60: 72 2f 7b 73 74 6f 70 2c 73 74 61 72 74 7d 60 20 r/{stop,start}`
1c70: 63 61 6c 6c 73 20 74 6f 20 72 65 6d 65 64 69 61 calls to remedia
1c80: 74 65 20 61 6e 79 20 70 72 6f 62 6c 65 6d 73 20 te any problems
1c90: 69 74 20 66 69 6e 64 73 2e 0d 0a 0d 0a 2a 20 20 it finds.....*
1ca0: 20 2a 2a 60 2d 2d 69 6e 69 74 60 2a 2a 3a 20 41 **`--init`**: A
1cb0: 6c 74 68 6f 75 67 68 20 74 68 65 72 65 20 69 73 lthough there is
1cc0: 20 6e 6f 20 64 69 72 65 63 74 20 65 71 75 69 76 no direct equiv
1cd0: 61 6c 65 6e 74 20 74 6f 20 74 68 69 73 20 69 6e alent to this in
1ce0: 20 52 6f 75 74 65 72 4f 53 2c 20 6e 6f 74 68 69 RouterOS, nothi
1cf0: 6e 67 20 73 74 6f 70 73 20 79 6f 75 20 66 72 6f ng stops you fro
1d00: 6d 20 64 6f 69 6e 67 20 69 74 20 74 68 65 20 6f m doing it the o
1d10: 6c 64 2d 73 63 68 6f 6f 6c 20 77 61 79 2c 20 63 ld-school way, c
1d20: 72 65 61 74 69 6e 67 20 61 20 63 6f 6e 74 61 69 reating a contai
1d30: 6e 65 72 20 74 68 61 74 20 63 61 6c 6c 73 20 e2 ner that calls
1d40: 80 9c 60 45 4e 54 52 59 50 4f 49 4e 54 20 2f 73 `ENTRYPOINT /s
1d50: 62 69 6e 2f 69 6e 69 74 60 e2 80 9d 20 6f 72 20 bin/init`” or
1d60: 73 69 6d 69 6c 61 72 2c 20 77 68 69 63 68 20 74 similar, which t
1d70: 68 65 6e 20 73 74 61 72 74 73 20 74 68 65 20 73 hen starts the s
1d80: 75 62 6f 72 64 69 6e 61 74 65 20 73 65 72 76 69 ubordinate servi
1d90: 63 65 73 20 69 6e 73 69 64 65 20 74 68 61 74 20 ces inside that
1da0: 63 6f 6e 74 61 69 6e 65 72 2e 20 49 74 20 77 6f container. It wo
1db0: 75 6c 64 20 62 65 20 73 6f 6d 65 77 68 61 74 20 uld be somewhat
1dc0: 73 69 6c 6c 79 20 74 6f 20 75 73 65 20 73 79 73 silly to use sys
1dd0: 74 65 6d 64 20 66 6f 72 20 74 68 69 73 20 69 6e temd for this in
1de0: 20 61 20 63 6f 6e 74 61 69 6e 65 72 20 6d 65 61 a container mea
1df0: 6e 74 20 74 6f 20 72 75 6e 20 6f 6e 20 52 6f 75 nt to run on Rou
1e00: 74 65 72 4f 53 20 69 6e 20 70 61 72 74 69 63 75 terOS in particu
1e10: 6c 61 72 3b 20 61 20 6d 6f 72 65 20 73 75 69 74 lar; a more suit
1e20: 61 62 6c 65 20 61 6c 74 65 72 6e 61 74 69 76 65 able alternative
1e30: 20 77 6f 75 6c 64 20 62 65 20 5b 41 6c 70 69 6e would be [Alpin
1e40: 65 e2 80 99 73 20 4f 70 65 6e 52 43 5d 28 68 74 e’s OpenRC](ht
1e50: 74 70 73 3a 2f 2f 77 69 6b 69 2e 61 6c 70 69 6e tps://wiki.alpin
1e60: 65 6c 69 6e 75 78 2e 6f 72 67 2f 77 69 6b 69 2f elinux.org/wiki/
1e70: 4f 70 65 6e 52 43 29 20 69 6e 69 74 20 73 79 73 OpenRC) init sys
1e80: 74 65 6d 2c 20 61 20 70 6f 70 75 6c 61 72 20 6f tem, a popular o
1e90: 70 74 69 6f 6e 20 66 6f 72 20 6d 61 6e 61 67 69 ption for managi
1ea0: 6e 67 20 69 6e 2d 63 6f 6e 74 61 69 6e 65 72 20 ng in-container
1eb0: 73 65 72 76 69 63 65 73 2e 0d 0a 0d 0a 2a 20 20 services.....*
1ec0: 20 2a 2a 60 2d 2d 6c 61 62 65 6c 60 2a 2a 3a 20 **`--label`**:
1ed0: 54 68 65 20 63 6c 6f 73 65 73 74 20 65 71 75 69 The closest equi
1ee0: 76 61 6c 65 6e 74 20 69 73 20 52 6f 75 74 65 72 valent is Router
1ef0: 4f 53 e2 80 99 73 20 60 63 6f 6d 6d 65 6e 74 60 OS’s `comment`
1f00: 20 66 61 63 69 6c 69 74 79 2c 20 77 68 69 63 68 facility, which
1f10: 20 79 6f 75 20 63 61 6e 20 61 70 70 6c 79 20 74 you can apply t
1f20: 6f 20 61 20 72 75 6e 6e 69 6e 67 20 63 6f 6e 74 o a running cont
1f30: 61 69 6e 65 72 20 77 69 74 68 20 e2 80 9c 60 2f ainer with “`/
1f40: 63 6f 6e 74 61 69 6e 65 72 2f 73 65 74 20 30 20 container/set 0
1f50: 63 6f 6d 6d 65 6e 74 3d 4d 59 4c 41 42 45 4c 60 comment=MYLABEL`
1f60: e2 80 9d 2e 0d 0a 0d 0a 2a 20 20 20 2a 2a 60 2d ”.....* **`-
1f70: 2d 6d 61 63 2d 61 64 64 72 65 73 73 60 2a 2a 3a -mac-address`**:
1f80: 20 49 66 20 52 6f 75 74 65 72 4f 53 20 68 61 64 If RouterOS had
1f90: 20 74 68 69 73 2c 20 49 20 77 6f 75 6c 64 20 65 this, I would e
1fa0: 78 70 65 63 74 20 69 74 20 74 6f 20 62 65 20 6f xpect it to be o
1fb0: 66 66 65 72 65 64 20 61 73 20 e2 80 9c 60 2f 69 ffered as “`/i
1fc0: 6e 74 65 72 66 61 63 65 2f 76 65 74 68 2f 73 65 nterface/veth/se
1fd0: 74 20 6d 61 63 2d 61 64 64 72 65 73 73 3d e2 80 t mac-address=
1fe0: a6 60 e2 80 9d 2c 20 62 75 74 20 74 68 61 74 20 `”, but that
1ff0: 64 6f 65 73 20 6e 6f 74 20 63 75 72 72 65 6e 74 does not current
2000: 6c 79 20 65 78 69 73 74 2e 20 41 73 20 69 74 20 ly exist. As it
2010: 73 74 61 6e 64 73 2c 20 61 20 56 45 54 48 20 69 stands, a VETH i
2020: 6e 74 65 72 66 61 63 65 e2 80 99 73 20 4d 41 43 nterface’s MAC
2030: 20 61 64 64 72 65 73 73 20 69 73 20 72 61 6e 64 address is rand
2040: 6f 6d 2c 20 73 61 6d 65 20 61 73 20 74 68 65 20 om, same as the
2050: 64 65 66 61 75 6c 74 20 62 65 68 61 76 69 6f 72 default behavior
2060: 20 6f 66 20 44 6f 63 6b 65 72 2e 0d 0a 0d 0a 2a of Docker.....*
2070: 20 20 20 2a 2a 60 2d 2d 6e 65 74 77 6f 72 6b 60 **`--network`
2080: 2a 2a 3a 20 54 68 69 73 20 6f 6e 65 20 69 73 20 **: This one is
2090: 74 72 69 63 6b 79 2e 20 57 68 69 6c 65 20 74 68 tricky. While th
20a0: 65 72 65 20 69 73 20 63 65 72 74 61 69 6e 6c 79 ere is certainly
20b0: 20 6e 6f 74 68 69 6e 67 20 6c 69 6b 65 20 e2 80 nothing like
20c0: 9c 60 2f 63 6f 6e 74 61 69 6e 65 72 2f 61 64 64 `/container/add
20d0: 20 6e 65 74 77 6f 72 6b 3d e2 80 a6 60 e2 80 9d network=…`”
20e0: 2c 20 69 74 e2 80 99 73 20 66 61 69 72 20 74 6f , it’s fair to
20f0: 20 73 61 79 20 74 68 65 20 65 71 75 69 76 61 6c say the equival
2100: 65 6e 74 20 69 73 2c 20 e2 80 9c 52 6f 75 74 65 ent is, “Route
2110: 72 4f 53 2e e2 80 9d 20 59 6f 75 20 61 72 65 2c rOS.” You are,
2120: 20 61 66 74 65 72 20 61 6c 6c 2c 20 72 75 6e 6e after all, runn
2130: 69 6e 67 20 74 68 69 73 20 63 6f 6e 74 61 69 6e ing this contain
2140: 65 72 20 61 74 6f 70 20 61 20 68 69 67 68 6c 79 er atop a highly
2150: 20 66 65 61 74 75 72 65 66 75 6c 20 6e 65 74 77 featureful netw
2160: 6f 72 6b 20 6f 70 65 72 61 74 69 6e 67 20 73 79 ork operating sy
2170: 73 74 65 6d 2e 20 42 61 72 65 2d 62 6f 6e 65 73 stem. Bare-bones
2180: 20 74 68 65 20 60 63 6f 6e 74 61 69 6e 65 72 2e the `container.
2190: 6e 70 6b 60 20 72 75 6e 74 69 6d 65 20 6d 61 79 npk` runtime may
21a0: 20 62 65 2c 20 62 75 74 20 61 6e 79 20 6c 69 6d be, but any lim
21b0: 69 74 61 74 69 6f 6e 73 20 79 6f 75 20 72 75 6e itations you run
21c0: 20 69 6e 74 6f 20 77 69 74 68 20 74 68 65 20 6e into with the n
21d0: 65 74 77 6f 72 6b 20 69 74 20 61 74 74 61 63 68 etwork it attach
21e0: 65 73 20 74 6f 20 61 72 65 20 6d 6f 72 65 20 61 es to are more a
21f0: 20 72 65 66 6c 65 63 74 69 6f 6e 20 6f 66 20 79 reflection of y
2200: 6f 75 72 20 69 6d 61 67 69 6e 61 74 69 6f 6e 20 our imagination
2210: 61 6e 64 20 73 6b 69 6c 6c 20 74 68 61 6e 20 74 and skill than t
2220: 6f 20 6c 61 63 6b 20 6f 66 20 63 6f 6d 6d 61 6e o lack of comman
2230: 64 20 6f 70 74 69 6f 6e 73 20 75 6e 64 65 72 20 d options under
2240: 60 2f 63 6f 6e 74 61 69 6e 65 72 60 2e 0d 0a 0d `/container`....
2250: 0a 2a 20 20 20 2a 2a 60 2d 2d 70 69 64 2f 75 73 .* **`--pid/us
2260: 65 72 6e 73 2f 75 74 73 60 2a 2a 3a 20 54 68 65 erns/uts`**: The
2270: 20 52 6f 75 74 65 72 4f 53 20 63 6f 6e 74 61 69 RouterOS contai
2280: 6e 65 72 20 72 75 6e 6e 65 72 20 6d 75 73 74 20 ner runner must
2290: 75 73 65 20 4c 69 6e 75 78 20 6e 61 6d 65 73 70 use Linux namesp
22a0: 61 63 65 73 20 75 6e 64 65 72 20 74 68 65 20 68 aces under the h
22b0: 6f 6f 64 2c 20 62 75 74 20 69 74 20 64 6f 65 73 ood, but it does
22c0: 20 6e 6f 74 20 6f 66 66 65 72 20 79 6f 75 20 63 not offer you c
22d0: 6f 6e 74 72 6f 6c 20 6f 76 65 72 20 77 68 69 63 ontrol over whic
22e0: 68 20 50 49 44 2c 20 66 69 6c 65 2c 20 6e 65 74 h PID, file, net
22f0: 77 6f 72 6b 2c 20 65 74 63 2e 20 6e 61 6d 65 73 work, etc. names
2300: 70 61 63 65 73 20 65 61 63 68 20 63 6f 6e 74 61 paces each conta
2310: 69 6e 65 72 20 75 73 65 73 2e 0d 0a 0d 0a 2a 20 iner uses.....*
2320: 20 20 2a 2a 60 2d 2d 72 65 61 64 2d 6f 6e 6c 79 **`--read-only
2330: 60 2a 2a 3a 20 52 6f 75 74 65 72 4f 53 20 6f 66 `**: RouterOS of
2340: 66 65 72 73 20 70 72 65 63 69 6f 75 73 20 6c 69 fers precious li
2350: 74 74 6c 65 20 69 6e 20 74 65 72 6d 73 20 6f 66 ttle in terms of
2360: 20 66 69 6c 65 20 73 79 73 74 65 6d 20 70 65 72 file system per
2370: 6d 69 73 73 69 6f 6e 20 61 64 6a 75 73 74 6d 65 mission adjustme
2380: 6e 74 2e 20 41 73 20 61 20 72 75 6c 65 2c 20 69 nt. As a rule, i
2390: 74 20 69 73 20 62 65 73 74 20 74 6f 20 65 69 74 t is best to eit
23a0: 68 65 72 20 73 68 65 6c 6c 20 69 6e 74 6f 20 74 her shell into t
23b0: 68 65 20 63 6f 6e 74 61 69 6e 65 72 20 61 6e 64 he container and
23c0: 20 61 64 6a 75 73 74 20 70 65 72 6d 69 73 73 69 adjust permissi
23d0: 6f 6e 73 20 74 68 65 72 65 20 6f 72 20 72 65 62 ons there or reb
23e0: 75 69 6c 64 20 74 68 65 20 63 6f 6e 74 61 69 6e uild the contain
23f0: 65 72 20 77 69 74 68 20 74 68 65 20 70 65 72 6d er with the perm
2400: 69 73 73 69 6f 6e 73 20 79 6f 75 20 77 61 6e 74 issions you want
2410: 20 66 72 6f 6d 20 67 6f 2e 20 41 6e 79 20 65 78 from go. Any ex
2420: 70 65 63 74 61 74 69 6f 6e 73 20 62 61 73 65 64 pectations based
2430: 20 6f 6e 20 62 65 69 6e 67 20 61 62 6c 65 20 74 on being able t
2440: 6f 20 61 64 6a 75 73 74 20 61 6e 79 20 6f 66 20 o adjust any of
2450: 74 68 69 73 20 62 65 74 77 65 65 6e 20 69 6d 61 this between ima
2460: 67 65 20 64 6f 77 6e 6c 6f 61 64 20 74 69 6d 65 ge download time
2470: 20 61 6e 64 20 63 6f 6e 74 61 69 6e 65 72 20 63 and container c
2480: 72 65 61 74 69 6f 6e 20 74 69 6d 65 20 61 72 65 reation time are
2490: 20 6c 69 6b 65 6c 79 20 74 6f 20 66 6f 75 6e 64 likely to found
24a0: 65 72 2e 0d 0a 0d 0a 2a 20 20 20 2a 2a 60 2d 2d er.....* **`--
24b0: 72 65 73 74 61 72 74 60 2a 2a 3a 20 3c 61 20 69 restart`**: <a i
24c0: 64 3d 22 72 65 73 74 61 72 74 22 3e 3c 2f 61 3e d="restart"></a>
24d0: 54 68 65 20 63 6c 6f 73 65 73 74 20 52 6f 75 74 The closest Rout
24e0: 65 72 4f 53 20 67 65 74 73 20 74 6f 20 74 68 69 erOS gets to thi
24f0: 73 20 69 73 20 69 74 73 20 60 73 74 61 72 74 2d s is its `start-
2500: 6f 6e 2d 62 6f 6f 74 60 20 73 65 74 74 69 6e 67 on-boot` setting
2510: 2c 20 6d 65 61 6e 69 6e 67 20 79 6f 75 e2 80 99 , meaning you’
2520: 64 20 68 61 76 65 20 74 6f 20 72 65 62 6f 6f 74 d have to reboot
2530: 20 74 68 65 20 72 6f 75 74 65 72 20 74 6f 20 67 the router to g
2540: 65 74 20 74 68 65 20 63 6f 6e 74 61 69 6e 65 72 et the container
2550: 20 74 6f 20 72 65 73 74 61 72 74 2e 20 49 66 20 to restart. If
2560: 79 6f 75 20 77 61 6e 74 20 61 75 74 6f 6d 61 74 you want automat
2570: 69 63 20 72 65 73 74 61 72 74 73 2c 20 79 6f 75 ic restarts, you
2580: 20 77 69 6c 6c 20 68 61 76 65 20 74 6f 20 5b 73 will have to [s
2590: 63 72 69 70 74 5d 20 69 74 2e 0d 0a 0d 0a 2a 20 cript] it.....*
25a0: 20 20 2a 2a 60 2d 2d 72 6d 60 2a 2a 3a 20 4e 6f **`--rm`**: No
25b0: 20 64 69 72 65 63 74 20 65 71 75 69 76 61 6c 65 direct equivale
25c0: 6e 74 2e 20 54 68 65 72 65 20 69 73 20 61 20 6d nt. There is a m
25d0: 61 6e 75 61 6c 20 60 2f 63 6f 6e 74 61 69 6e 65 anual `/containe
25e0: 72 2f 72 65 6d 6f 76 65 60 20 63 6f 6d 6d 61 6e r/remove` comman
25f0: 64 2c 20 62 75 74 20 6e 6f 74 68 69 6e 67 20 6c d, but nothing l
2600: 69 6b 65 20 74 68 69 73 20 6f 70 74 69 6f 6e 2c ike this option,
2610: 20 77 68 69 63 68 20 63 61 75 73 65 73 20 74 68 which causes th
2620: 65 20 63 6f 6e 74 61 69 6e 65 72 20 72 75 6e 74 e container runt
2630: 69 6d 65 20 74 6f 20 61 75 74 6f 6d 61 74 69 63 ime to automatic
2640: 61 6c 6c 79 20 72 65 6d 6f 76 65 20 74 68 65 20 ally remove the
2650: 69 6e 73 74 61 6e 74 69 61 74 65 64 20 63 6f 6e instantiated con
2660: 74 61 69 6e 65 72 20 61 66 74 65 72 20 69 74 20 tainer after it
2670: 65 78 69 74 73 2e 20 49 74 e2 80 99 73 20 6a 75 exits. It’s ju
2680: 73 74 20 61 73 20 77 65 6c 6c 20 73 69 6e 63 65 st as well since
2690: 20 74 68 69 73 20 6f 70 74 69 6f 6e 20 69 73 20 this option is
26a0: 6d 6f 73 74 20 6f 66 74 65 6e 20 75 73 65 64 20 most often used
26b0: 77 68 65 6e 20 72 75 6e 6e 69 6e 67 20 5f 61 64 when running _ad
26c0: 20 68 6f 63 5f 20 63 6f 6e 74 61 69 6e 65 72 73 hoc_ containers
26d0: 20 6d 61 64 65 20 66 72 6f 6d 20 61 20 70 72 65 made from a pre
26e0: 76 69 6f 75 73 6c 79 20 64 6f 77 6e 6c 6f 61 64 viously download
26f0: 65 64 20 69 6d 61 67 65 3b 20 52 6f 75 74 65 72 ed image; Router
2700: 4f 53 e2 80 99 73 20 6c 61 63 6b 20 6f 66 20 61 OS’s lack of a
2710: 6e 20 69 6d 61 67 65 20 63 61 63 68 65 20 6d 65 n image cache me
2720: 61 6e 73 20 79 6f 75 20 68 61 76 65 20 74 6f 20 ans you have to
2730: 67 6f 20 6f 75 74 20 6f 66 20 79 6f 75 72 20 77 go out of your w
2740: 61 79 20 74 6f 20 65 78 70 6f 72 74 20 61 20 74 ay to export a t
2750: 61 72 62 61 6c 6c 20 6f 66 20 74 68 65 20 69 6d arball of the im
2760: 61 67 65 20 61 6e 64 20 75 70 6c 6f 61 64 20 69 age and upload i
2770: 74 20 74 6f 20 74 68 65 20 72 6f 75 74 65 72 2c t to the router,
2780: 20 74 68 65 6e 20 75 73 65 20 e2 80 9c 60 2f 63 then use “`/c
2790: 6f 6e 74 61 69 6e 65 72 2f 61 64 64 20 66 69 6c ontainer/add fil
27a0: 65 3d e2 80 a6 60 e2 80 9d 20 69 66 20 79 6f 75 e=…`” if you
27b0: 20 77 61 6e 74 20 74 6f 20 61 76 6f 69 64 20 72 want to avoid r
27c0: 65 2d 64 6f 77 6e 6c 6f 61 64 69 6e 67 20 74 68 e-downloading th
27d0: 65 20 69 6d 61 67 65 20 66 72 6f 6d 20 74 68 65 e image from the
27e0: 20 72 65 70 6f 73 69 74 6f 72 79 20 6f 6e 20 65 repository on e
27f0: 61 63 68 20 72 65 6c 61 75 6e 63 68 2e 0d 0a 0d ach relaunch....
2800: 0a 54 68 61 74 20 62 72 69 6e 67 73 20 75 73 20 .That brings us
2810: 74 6f 20 74 68 65 20 72 65 6c 61 74 65 64 20 6d to the related m
2820: 61 74 74 65 72 20 6f 66 e2 80 a6 0d 0a 0d 0a 5b atter of…....[
2830: 73 63 72 69 70 74 5d 3a 20 68 74 74 70 73 3a 2f script]: https:/
2840: 2f 68 65 6c 70 2e 6d 69 6b 72 6f 74 69 6b 2e 63 /help.mikrotik.c
2850: 6f 6d 2f 64 6f 63 73 2f 64 69 73 70 6c 61 79 2f om/docs/display/
2860: 52 4f 53 2f 53 63 72 69 70 74 69 6e 67 0d 0a 0d ROS/Scripting...
2870: 0a 0d 0a 23 20 3c 61 20 69 64 3d 22 72 75 6e 22 ...# <a id="run"
2880: 3e 3c 2f 61 3e 54 68 65 72 65 20 49 73 20 4e 6f ></a>There Is No
2890: 20 e2 80 9c 52 75 6e e2 80 9d 0d 0a 0d 0a 52 6f “Run”....Ro
28a0: 75 74 65 72 4f 53 20 6f 66 66 65 72 73 20 6e 6f uterOS offers no
28b0: 20 73 68 6f 72 74 68 61 6e 64 20 63 6f 6d 6d 61 shorthand comma
28c0: 6e 64 20 61 6b 69 6e 20 74 6f 20 60 64 6f 63 6b nd akin to `dock
28d0: 65 72 20 72 75 6e 60 20 66 6f 72 20 63 72 65 61 er run` for crea
28e0: 74 69 6e 67 20 61 6e 64 20 73 74 61 72 74 69 6e ting and startin
28f0: 67 20 61 20 63 6f 6e 74 61 69 6e 65 72 20 69 6e g a container in
2900: 20 61 20 73 69 6e 67 6c 65 20 73 74 65 70 2e 20 a single step.
2910: 4d 6f 72 65 6f 76 65 72 2c 20 74 68 65 20 6c 61 Moreover, the la
2920: 63 6b 20 6f 66 20 4c 69 6e 75 78 2d 6c 69 6b 65 ck of Linux-like
2930: 20 69 6e 74 65 72 61 63 74 69 76 65 20 74 65 72 interactive ter
2940: 6d 69 6e 61 6c 20 68 61 6e 64 6c 69 6e 67 20 e2 minal handling
2950: 80 94 20 63 6f 76 65 72 65 64 20 5b 62 65 6c 6f covered [belo
2960: 77 5d 28 23 74 65 72 6d 69 6e 61 6c 29 20 e2 80 w](#terminal)
2970: 94 20 6d 65 61 6e 73 20 61 20 73 69 6d 70 6c 65 means a simple
2980: 20 63 6f 6d 6d 61 6e 64 20 6c 69 6b 65 e2 80 a6 command like…
2990: 0d 0a 0d 0a 20 20 20 20 24 20 64 6f 63 6b 65 72 .... $ docker
29a0: 20 72 75 6e 20 2d 2d 72 6d 20 2d 69 74 20 61 6c run --rm -it al
29b0: 70 69 6e 65 3a 6c 61 74 65 73 74 0d 0a 0d 0a e2 pine:latest....
29c0: 80 a6 66 6f 6c 6c 6f 77 65 64 20 62 79 e2 80 a6 followed by…
29d0: 0d 0a 0d 0a 20 20 20 20 73 68 2d 35 2e 31 23 20 .... sh-5.1#
29e0: 3c 64 6f 20 73 6f 6d 65 74 68 69 6e 67 20 69 6e <do something in
29f0: 73 69 64 65 20 74 68 65 20 63 6f 6e 74 61 69 6e side the contain
2a00: 65 72 3e 0d 0a 20 20 20 20 73 68 2d 35 2e 31 23 er>.. sh-5.1#
2a10: 20 65 78 69 74 0d 0a 0d 0a e2 80 a6 6d 61 79 20 exit....…may
2a20: 65 6e 64 20 75 70 20 65 78 70 72 65 73 73 65 64 end up expressed
2a30: 20 75 6e 64 65 72 20 52 6f 75 74 65 72 4f 53 20 under RouterOS
2a40: 61 73 e2 80 a6 0d 0a 0d 0a 20 20 20 20 3e 20 2f as….... > /
2a50: 63 6f 6e 74 61 69 6e 65 72 0d 0a 20 20 20 20 3e container.. >
2a60: 20 61 64 64 20 72 65 6d 6f 74 65 2d 69 6d 61 67 add remote-imag
2a70: 65 3d 61 6c 70 69 6e 65 3a 6c 61 74 65 73 74 20 e=alpine:latest
2a80: 76 65 74 68 3d 76 65 74 68 31 20 65 6e 74 72 79 veth=veth1 entry
2a90: 70 6f 69 6e 74 3d 73 6c 65 65 70 20 63 6d 64 3d point=sleep cmd=
2aa0: 33 36 30 30 0d 0a 20 20 20 20 3e 20 70 72 69 6e 3600.. > prin
2ab0: 74 0d 0a 20 20 20 20 e2 80 a6 20 6e 6f 70 65 2c t.. … nope,
2ac0: 20 73 74 69 6c 6c 20 64 6f 77 6e 6c 6f 61 64 69 still downloadi
2ad0: 6e 67 2c 20 77 61 69 74 20 e2 80 a6 0d 0a 20 20 ng, wait …..
2ae0: 20 20 3e 20 70 72 69 6e 74 0d 0a 20 20 20 20 e2 > print..
2af0: 80 a6 20 6e 6f 70 65 2c 20 73 74 69 6c 6c 20 65 nope, still e
2b00: 78 74 72 61 63 74 69 6e 67 2c 20 77 61 69 74 20 xtracting, wait
2b10: 6c 6f 6e 67 65 72 20 e2 80 a6 0d 0a 20 20 20 20 longer …..
2b20: 3e 20 70 72 69 6e 74 0d 0a 20 20 20 20 e2 80 a6 > print.. …
2b30: 20 6f 68 2c 20 67 6f 6f 64 2c 20 67 6f 74 20 74 oh, good, got t
2b40: 68 65 20 63 6f 6e 74 61 69 6e 65 72 20 49 44 20 he container ID
2b50: e2 80 a6 0d 0a 20 20 20 20 3e 20 73 74 61 72 74 ….. > start
2b60: 20 30 0d 0a 20 20 20 20 e2 80 a6 20 77 61 69 74 0.. … wait
2b70: 20 66 6f 72 20 69 74 20 74 6f 20 6c 61 75 6e 63 for it to launc
2b80: 68 20 e2 80 a6 0d 0a 20 20 20 20 3e 20 73 68 65 h ….. > she
2b90: 6c 6c 20 30 0d 0a 20 20 20 20 73 68 2d 35 2e 31 ll 0.. sh-5.1
2ba0: 23 20 3c 64 6f 20 73 6f 6d 65 74 68 69 6e 67 20 # <do something
2bb0: 69 6e 73 69 64 65 20 74 68 65 20 63 6f 6e 74 61 inside the conta
2bc0: 69 6e 65 72 3e 0d 0a 20 20 20 20 73 68 2d 35 2e iner>.. sh-5.
2bd0: 31 23 20 65 78 69 74 0d 0a 20 20 20 20 3e 20 73 1# exit.. > s
2be0: 74 6f 70 20 30 0d 0a 20 20 20 20 3e 20 72 65 6d top 0.. > rem
2bf0: 6f 76 65 20 30 0d 0a 0d 0a 57 68 65 77 21 20 f0 ove 0....Whew!
2c00: 9f 98 85 0d 0a 0d 0a 49 20 72 65 73 6f 72 74 65 ....I resorte
2c10: 64 20 74 6f 20 74 68 61 74 20 e2 80 9c 73 6c 65 d to that “sle
2c20: 65 70 20 33 36 30 30 e2 80 9d 20 68 61 63 6b 20 ep 3600” hack
2c30: 69 6e 20 6f 72 64 65 72 20 74 6f 20 77 6f 72 6b in order to work
2c40: 20 61 72 6f 75 6e 64 20 74 68 65 20 6c 61 63 6b around the lack
2c50: 20 6f 66 20 69 6e 74 65 72 61 63 74 69 76 65 20 of interactive
2c60: 6d 6f 64 65 20 69 6e 20 60 63 6f 6e 74 61 69 6e mode in `contain
2c70: 65 72 2e 6e 70 6b 60 2c 20 77 69 74 68 6f 75 74 er.npk`, without
2c80: 20 77 68 69 63 68 20 63 6f 6e 74 61 69 6e 65 72 which container
2c90: 73 20 6f 66 20 74 68 69 73 20 74 79 70 65 20 77 s of this type w
2ca0: 69 6c 6c 20 73 74 61 72 74 2c 20 64 6f 20 61 20 ill start, do a
2cb0: 77 68 6f 6c 65 20 6c 6f 74 20 6f 66 20 5f 6e 6f whole lot of _no
2cc0: 74 68 69 6e 67 5f 2c 20 61 6e 64 20 74 68 65 6e thing_, and then
2cd0: 20 73 74 6f 70 2e 20 49 20 68 61 64 20 74 6f 20 stop. I had to
2ce0: 67 69 76 65 20 69 74 20 73 6f 6d 65 20 74 79 70 give it some typ
2cf0: 65 20 6f 66 20 62 75 73 79 2d 77 6f 72 6b 20 74 e of busy-work t
2d00: 6f 20 6b 65 65 70 20 69 74 20 61 6c 69 76 65 20 o keep it alive
2d10: 6c 6f 6e 67 20 65 6e 6f 75 67 68 20 74 6f 20 6c long enough to l
2d20: 65 74 20 6d 65 20 73 68 65 6c 6c 20 69 6e 20 61 et me shell in a
2d30: 6e 64 20 64 6f 20 6d 79 20 61 63 74 75 61 6c 20 nd do my actual
2d40: 77 6f 72 6b 2e 20 54 68 69 73 20 73 6e 65 61 6b work. This sneak
2d50: 79 20 73 63 61 6d 20 69 73 20 61 20 63 6f 6d 6d y scam is a comm
2d60: 6f 6e 20 6f 6e 65 20 66 6f 72 20 61 63 63 6f 6d on one for accom
2d70: 70 6c 69 73 68 69 6e 67 20 74 68 61 74 20 65 6e plishing that en
2d80: 64 2c 20 62 75 74 20 69 74 20 68 61 73 20 74 68 d, but it has th
2d90: 65 20 64 6f 77 6e 73 69 64 65 20 6f 66 20 72 65 e downside of re
2da0: 71 75 69 72 69 6e 67 20 79 6f 75 20 74 6f 20 70 quiring you to p
2db0: 72 65 64 69 63 74 20 68 6f 77 20 6c 6f 6e 67 20 redict how long
2dc0: 79 6f 75 20 77 61 6e 74 20 74 68 65 20 63 6f 6e you want the con
2dd0: 74 61 69 6e 65 72 20 74 6f 20 72 75 6e 20 62 65 tainer to run be
2de0: 66 6f 72 65 20 73 74 6f 70 70 69 6e 67 3b 20 74 fore stopping; t
2df0: 68 69 73 20 76 65 72 73 69 6f 6e 20 6f 6e 6c 79 his version only
2e00: 20 6c 61 73 74 73 20 61 6e 20 68 6f 75 72 2e 0d lasts an hour..
2e10: 0a 0d 0a 49 66 20 79 6f 75 20 61 72 65 20 69 6d ...If you are im
2e20: 61 67 69 6e 67 20 6d 6f 72 65 20 63 6f 6d 70 6c aging more compl
2e30: 69 63 61 74 65 64 20 6d 65 74 68 6f 64 73 20 66 icated methods f
2e40: 6f 72 20 6b 65 65 70 69 6e 67 20 63 6f 6e 74 61 or keeping conta
2e50: 69 6e 65 72 73 20 72 75 6e 6e 69 6e 67 20 69 6e iners running in
2e60: 20 74 68 65 20 62 61 63 6b 67 72 6f 75 6e 64 20 the background
2e70: 77 68 65 6e 20 74 68 65 79 20 77 65 72 65 20 64 when they were d
2e80: 65 73 69 67 6e 65 64 20 74 6f 20 72 75 6e 20 69 esigned to run i
2e90: 6e 74 65 72 61 63 74 69 76 65 6c 79 2c 20 79 6f nteractively, yo
2ea0: 75 20 61 72 65 20 6e 65 78 74 20 6c 69 61 62 6c u are next liabl
2eb0: 65 20 74 6f 20 66 61 6c 6c 20 69 6e 74 6f 20 74 e to fall into t
2ec0: 68 65 20 74 72 61 70 20 74 68 61 74 e2 80 a6 0d he trap that….
2ed0: 0a 0d 0a 0d 0a 23 20 3c 61 20 69 64 3d 22 63 6d .....# <a id="cm
2ee0: 64 22 3e 3c 2f 61 3e 54 68 65 72 65 20 49 73 20 d"></a>There Is
2ef0: 4e 6f 20 48 6f 73 74 2d 53 69 64 65 20 43 6f 6d No Host-Side Com
2f00: 6d 61 6e 64 20 4c 69 6e 65 20 50 61 72 73 65 72 mand Line Parser
2f10: 0d 0a 0d 0a 54 68 65 20 52 6f 75 74 65 72 4f 53 ....The RouterOS
2f20: 20 43 4c 49 20 69 73 6e e2 80 99 74 20 61 20 42 CLI isn’t a B
2f30: 6f 75 72 6e 65 20 73 68 65 6c 6c 2c 20 61 6e 64 ourne shell, and
2f40: 20 74 68 65 20 63 6f 6e 74 61 69 6e 65 72 20 66 the container f
2f50: 65 61 74 75 72 65 e2 80 99 73 20 60 65 6e 74 72 eature’s `entr
2f60: 79 70 6f 69 6e 74 60 20 61 6e 64 20 60 63 6d 64 ypoint` and `cmd
2f70: 60 20 6f 70 74 69 6f 6e 20 70 61 72 73 65 72 73 ` option parsers
2f80: 20 74 72 65 61 74 73 20 74 68 65 6d 20 61 73 20 treats them as
2f90: 73 69 6d 70 6c 65 20 73 74 72 69 6e 67 73 2c 20 simple strings,
2fa0: 77 69 74 68 6f 75 74 20 61 6e 79 20 6f 66 20 74 without any of t
2fb0: 68 65 20 70 61 72 73 69 6e 67 20 79 6f 75 20 67 he parsing you g
2fc0: 65 74 20 66 6f 72 20 66 72 65 65 20 77 68 65 6e et for free when
2fd0: 20 74 79 70 69 6e 67 20 60 64 6f 63 6b 65 72 60 typing `docker`
2fe0: 20 63 6f 6d 6d 61 6e 64 73 20 69 6e 74 6f 20 61 commands into a
2ff0: 20 4c 69 6e 75 78 20 63 6f 6d 6d 61 6e 64 20 73 Linux command s
3000: 68 65 6c 6c 2e 20 54 68 65 20 6e 65 74 20 65 66 hell. The net ef
3010: 66 65 63 74 20 6f 66 20 61 6c 6c 20 74 68 69 73 fect of all this
3020: 20 69 73 20 74 68 61 74 20 79 6f 75 e2 80 99 72 is that you’r
3030: 65 20 6c 69 6d 69 74 65 64 20 74 6f 20 74 77 6f e limited to two
3040: 2d 77 6f 72 64 20 63 6f 6d 6d 61 6e 64 73 2c 20 -word commands,
3050: 6f 6e 65 20 69 6e 20 60 65 6e 74 72 79 70 6f 69 one in `entrypoi
3060: 6e 74 60 20 61 6e 64 20 74 68 65 20 6f 74 68 65 nt` and the othe
3070: 72 20 69 6e 20 60 63 6d 64 60 2c 20 61 73 20 69 r in `cmd`, as i
3080: 6e 20 74 68 65 20 61 62 6f 76 65 20 e2 80 9c 60 n the above “`
3090: 73 6c 65 65 70 20 33 36 30 30 60 e2 80 9d 20 68 sleep 3600`” h
30a0: 61 63 6b 2e 0d 0a 0d 0a 42 75 74 20 68 6f 77 20 ack.....But how
30b0: 74 68 65 6e 20 64 6f 20 79 6f 75 20 73 61 79 20 then do you say
30c0: 73 6f 6d 65 74 68 69 6e 67 20 61 6b 69 6e 20 74 something akin t
30d0: 6f 20 74 68 65 20 66 6f 6c 6c 6f 77 69 6e 67 20 o the following
30e0: 75 6e 64 65 72 20 52 6f 75 74 65 72 4f 53 3f 0d under RouterOS?.
30f0: 0a 0d 0a 20 20 20 20 64 6f 63 6b 65 72 20 72 75 ... docker ru
3100: 6e 20 2d 69 74 20 61 6c 70 69 6e 65 3a 6c 61 74 n -it alpine:lat
3110: 65 73 74 20 6c 73 20 2d 6c 52 20 2f 65 74 63 0d est ls -lR /etc.
3120: 0a 0d 0a 59 6f 75 20 6d 69 67 68 74 20 77 61 6e ...You might wan
3130: 74 20 74 6f 20 64 6f 20 74 68 61 74 20 69 6e 20 t to do that in
3140: 64 65 62 75 67 67 69 6e 67 20 74 6f 20 66 69 6e debugging to fin
3150: 64 20 6f 75 74 20 77 68 61 74 20 61 20 67 69 76 d out what a giv
3160: 65 6e 20 63 6f 6e 66 69 67 20 66 69 6c 65 20 69 en config file i
3170: 73 20 63 61 6c 6c 65 64 20 61 6e 64 20 65 78 61 s called and exa
3180: 63 74 6c 79 20 77 68 65 72 65 20 69 74 20 69 73 ctly where it is
3190: 20 69 6e 20 74 68 65 20 68 69 65 72 61 72 63 68 in the hierarch
31a0: 79 20 73 6f 20 74 68 61 74 20 79 6f 75 20 63 61 y so that you ca
31b0: 6e 20 74 61 72 67 65 74 20 69 74 20 77 69 74 68 n target it with
31c0: 20 61 20 60 6d 6f 75 6e 74 3d e2 80 a6 60 20 6f a `mount=…` o
31d0: 76 65 72 72 69 64 65 2e 20 49 66 20 79 6f 75 20 verride. If you
31e0: 74 72 79 20 74 6f 20 70 61 73 73 20 69 74 20 61 try to pass it a
31f0: 6c 6c 20 61 73 e2 80 a6 0d 0a 0d 0a 20 20 20 20 ll as…....
3200: 2f 63 6f 6e 74 61 69 6e 65 72 2f 61 64 64 20 e2 /container/add
3210: 80 a6 20 65 6e 74 72 79 70 6f 69 6e 74 3d 22 6c entrypoint="l
3220: 73 20 2d 6c 52 20 2f 65 74 63 22 0d 0a 0d 0a e2 s -lR /etc"....
3230: 80 a6 74 68 65 20 6b 65 72 6e 65 6c 20 77 69 6c the kernel wil
3240: 6c 20 63 6f 6d 70 6c 61 69 6e 20 74 68 61 74 20 l complain that
3250: 74 68 65 72 65 20 69 73 20 6e 6f 20 63 6f 6d 6d there is no comm
3260: 61 6e 64 20 69 6e 20 74 68 65 20 63 6f 6e 74 61 and in the conta
3270: 69 6e 65 72 e2 80 99 73 20 60 50 41 54 48 60 20 iner’s `PATH`
3280: 63 61 6c 6c 65 64 20 e2 80 9c 60 6c 73 20 2d 6c called “`ls -l
3290: 52 20 2f 65 74 63 60 e2 80 9d 2e 0d 0a 0d 0a 59 R /etc`”.....Y
32a0: 6f 75 20 6d 61 79 20 74 68 65 6e 20 74 72 79 20 ou may then try
32b0: 74 6f 20 73 70 6c 69 74 20 69 74 20 61 73 e2 80 to split it as
32c0: a6 0d 0a 0d 0a 20 20 20 20 2f 63 6f 6e 74 61 69 .... /contai
32d0: 6e 65 72 2f 61 64 64 20 e2 80 a6 20 65 6e 74 72 ner/add … entr
32e0: 79 70 6f 69 6e 74 3d 22 6c 73 22 20 63 6d 64 3d ypoint="ls" cmd=
32f0: 22 2d 6c 52 20 2f 65 74 63 22 0d 0a 0d 0a e2 80 "-lR /etc"....
3300: a6 62 75 74 20 74 68 61 74 20 77 69 6c 6c 20 65 but that will e
3310: 61 72 6e 20 79 6f 75 20 65 72 72 6f 72 20 6d 65 arn you error me
3320: 73 73 61 67 65 20 66 72 6f 6d 20 60 2f 62 69 6e ssage from `/bin
3330: 2f 6c 73 60 20 63 6f 6d 70 6c 61 69 6e 69 6e 67 /ls` complaining
3340: 20 74 68 61 74 20 69 74 20 72 65 66 75 73 65 73 that it refuses
3350: 20 74 6f 20 61 63 63 65 70 74 20 e2 80 9c 26 6e to accept “&n
3360: 62 73 70 3b e2 80 9d 20 28 73 70 61 63 65 29 20 bsp;” (space)
3370: 61 73 20 61 6e 20 6f 70 74 69 6f 6e 20 66 6f 6c as an option fol
3380: 6c 6f 77 69 6e 67 20 74 68 65 20 60 52 60 21 0d lowing the `R`!.
3390: 0a 0d 0a 49 66 20 79 6f 75 20 67 65 74 20 63 75 ...If you get cu
33a0: 74 65 20 61 6e 64 20 74 72 79 20 74 6f 20 e2 80 te and try to
33b0: 9c 63 75 64 64 6c 65 e2 80 9d 20 74 68 65 20 6f cuddle” the o
33c0: 70 74 69 6f 6e 73 20 77 69 74 68 20 74 68 65 20 ptions with the
33d0: 61 72 67 75 6d 65 6e 74 73 20 61 73 e2 80 a6 0d arguments as….
33e0: 0a 0d 0a 20 20 20 20 2f 63 6f 6e 74 61 69 6e 65 ... /containe
33f0: 72 2f 61 64 64 20 e2 80 a6 20 65 6e 74 72 79 70 r/add … entryp
3400: 6f 69 6e 74 3d 22 6c 73 22 20 63 6d 64 3d 22 2d oint="ls" cmd="-
3410: 6c 52 2f 65 74 63 22 0d 0a 0d 0a e2 80 a6 74 68 lR/etc"....…th
3420: 65 20 60 2f 62 69 6e 2f 6c 73 60 20 69 6d 70 6c e `/bin/ls` impl
3430: 65 6d 65 6e 74 61 74 69 6f 6e 20 77 69 6c 6c 20 ementation will
3440: 63 65 72 74 61 69 6e 6c 79 20 61 74 74 65 6d 70 certainly attemp
3450: 74 20 74 6f 20 74 72 65 61 74 20 60 2f 60 20 61 t to treat `/` a
3460: 73 20 61 6e 20 6f 70 74 69 6f 6e 20 61 6e 64 20 s an option and
3470: 64 69 65 20 77 69 74 68 20 61 6e 20 65 72 72 6f die with an erro
3480: 72 20 6d 65 73 73 61 67 65 2e 28 5e 59 65 73 2c r message.(^Yes,
3490: 20 66 6f 72 20 63 65 72 74 61 69 6e 2e 20 49 20 for certain. I
34a0: 74 65 73 74 65 64 20 74 68 65 20 47 4e 55 2c 20 tested the GNU,
34b0: 42 53 44 2c 20 5f 61 6e 64 5f 20 42 75 73 79 42 BSD, _and_ BusyB
34c0: 6f 78 20 69 6d 70 6c 65 6d 65 6e 74 61 74 69 6f ox implementatio
34d0: 6e 73 20 6f 66 20 60 6c 73 60 2c 20 61 6e 64 20 ns of `ls`, and
34e0: 74 68 65 79 20 61 6c 6c 20 64 6f 20 74 68 69 73 they all do this
34f0: 2e 29 0d 0a 0d 0a 54 68 69 6e 67 73 20 61 72 65 .)....Things are
3500: 6e e2 80 99 74 20 61 6c 77 61 79 73 20 74 68 69 n’t always thi
3510: 73 20 67 72 69 6d 2e 20 46 6f 72 20 69 6e 73 74 s grim. For inst
3520: 61 6e 63 65 2c 20 79 6f 75 20 63 61 6e 20 72 75 ance, you can ru
3530: 6e 20 5b 6d 79 20 60 69 70 65 72 66 33 60 20 63 n [my `iperf3` c
3540: 6f 6e 74 61 69 6e 65 72 5d 28 2f 64 69 72 2f 69 ontainer](/dir/i
3550: 70 65 72 66 33 29 20 61 73 20 61 20 63 6c 69 65 perf3) as a clie
3560: 6e 74 20 69 6e 73 74 65 61 64 20 6f 66 20 69 74 nt instead of it
3570: 73 20 64 65 66 61 75 6c 74 20 73 65 72 76 65 72 s default server
3580: 20 6d 6f 64 65 20 62 79 20 73 61 79 69 6e 67 20 mode by saying
3590: 73 6f 6d 65 74 68 69 6e 67 20 6c 69 6b 65 3a 0d something like:.
35a0: 0a 0d 0a 20 20 20 20 2f 63 6f 6e 74 61 69 6e 65 ... /containe
35b0: 72 2f 61 64 64 20 e2 80 a6 20 63 6d 64 3d 22 2d r/add … cmd="-
35c0: 63 31 39 32 2e 31 36 38 2e 38 38 2e 39 39 22 0d c192.168.88.99".
35d0: 0a 0d 0a 54 68 69 73 20 72 65 6c 69 65 73 20 6f ...This relies o
35e0: 6e 20 74 68 65 20 66 61 63 74 20 74 68 61 74 20 n the fact that
35f0: 74 68 65 20 60 69 70 65 72 66 33 60 20 63 6f 6d the `iperf3` com
3600: 6d 61 6e 64 20 70 61 72 73 65 72 20 6b 6e 6f 77 mand parser know
3610: 73 20 68 6f 77 20 74 6f 20 62 72 65 61 6b 20 74 s how to break t
3620: 68 65 20 68 6f 73 74 20 6e 61 6d 65 20 70 61 72 he host name par
3630: 74 20 6f 75 74 20 66 72 6f 6d 20 74 68 65 20 60 t out from the `
3640: 2d 63 60 20 6f 70 74 69 6f 6e 20 69 74 73 65 6c -c` option itsel
3650: 66 2c 20 73 6f 6d 65 74 68 69 6e 67 20 6e 6f 74 f, something not
3660: 20 61 6c 6c 20 63 6f 6d 6d 61 6e 64 20 70 61 72 all command par
3670: 73 65 72 73 20 61 72 65 20 73 6d 61 72 74 20 65 sers are smart e
3680: 6e 6f 75 67 68 20 74 6f 20 64 6f 2e 20 54 68 65 nough to do. The
3690: 72 65 e2 80 99 73 20 35 30 20 79 65 61 72 73 20 re’s 50 years
36a0: 6f 66 20 55 6e 69 78 20 61 6e 64 20 4c 69 6e 75 of Unix and Linu
36b0: 78 20 68 69 73 74 6f 72 79 20 65 6e 63 6f 75 72 x history encour
36c0: 61 67 69 6e 67 20 70 72 6f 67 72 61 6d 73 20 74 aging programs t
36d0: 6f 20 72 65 6c 79 20 6f 6e 20 74 68 65 20 73 68 o rely on the sh
36e0: 65 6c 6c 20 74 6f 20 64 6f 20 61 20 6c 6f 74 20 ell to do a lot
36f0: 6f 66 20 77 6f 72 6b 20 62 65 66 6f 72 65 20 74 of work before t
3700: 68 65 20 70 72 6f 67 72 61 6d e2 80 99 73 20 60 he program’s `
3710: 6d 61 69 6e 28 29 60 20 66 75 6e 63 74 69 6f 6e main()` function
3720: 20 69 73 20 65 76 65 6e 20 63 61 6c 6c 65 64 2e is even called.
3730: 20 54 68 65 20 63 6f 6d 6d 61 6e 64 20 6c 69 6e The command lin
3740: 65 20 70 72 6f 63 65 73 73 69 6e 67 20 74 68 61 e processing tha
3750: 74 20 60 63 6f 6e 74 61 69 6e 65 72 2e 6e 70 6b t `container.npk
3760: 60 20 61 70 70 6c 69 65 73 20 74 6f 20 69 74 73 ` applies to its
3770: 20 60 63 6d 64 60 20 61 72 67 75 6d 65 6e 74 20 `cmd` argument
3780: 6c 61 63 6b 73 20 61 6c 6c 20 74 68 61 74 20 70 lacks all that p
3790: 6f 77 65 72 2e 20 49 66 20 79 6f 75 20 77 61 6e ower. If you wan
37a0: 74 20 42 6f 75 72 6e 65 20 73 68 65 6c 6c 20 70 t Bourne shell p
37b0: 61 72 73 69 6e 67 20 6f 66 20 79 6f 75 72 20 63 arsing of your c
37c0: 6f 6d 6d 61 6e 64 20 6c 69 6e 65 2c 20 79 6f 75 ommand line, you
37d0: 20 68 61 76 65 20 74 6f 20 73 65 74 20 69 74 20 have to set it
37e0: 76 69 61 20 60 45 4e 54 52 59 50 4f 49 4e 54 60 via `ENTRYPOINT`
37f0: 20 6f 72 20 60 43 4d 44 60 20 69 6e 20 74 68 65 or `CMD` in the
3800: 20 60 44 6f 63 6b 65 72 66 69 6c 65 60 2c 20 74 `Dockerfile`, t
3810: 68 65 6e 20 72 65 62 75 69 6c 64 20 74 68 65 20 hen rebuild the
3820: 69 6d 61 67 65 2e 0d 0a 0d 0a 0d 0a 23 20 3c 61 image.......# <a
3830: 20 69 64 3d 22 74 65 72 6d 69 6e 61 6c 22 3e 3c id="terminal"><
3840: 2f 61 3e 54 65 72 6d 69 6e 61 6c 20 48 61 6e 64 /a>Terminal Hand
3850: 6c 69 6e 67 0d 0a 0d 0a 41 6c 74 68 6f 75 67 68 ling....Although
3860: 20 52 6f 75 74 65 72 4f 53 20 70 72 6f 70 65 72 RouterOS proper
3870: 20 69 73 20 62 75 69 6c 74 20 61 74 6f 70 20 4c is built atop L
3880: 69 6e 75 78 2c 20 61 6e 64 20 69 74 20 70 72 6f inux, and it pro
3890: 76 69 64 65 73 20 61 20 66 65 61 74 75 72 65 2d vides a feature-
38a0: 72 69 63 68 20 43 4c 49 2c 20 69 74 20 69 73 20 rich CLI, it is
38b0: 6e 6f 74 68 69 6e 67 20 6c 69 6b 65 20 61 20 4c nothing like a L
38c0: 69 6e 75 78 20 63 6f 6d 6d 61 6e 64 20 73 68 65 inux command she
38d0: 6c 6c 2e 20 49 20 61 6d 20 6e 6f 74 20 73 70 65 ll. I am not spe
38e0: 61 6b 69 6e 67 20 6f 66 20 73 6b 69 6e 2d 6c 65 aking of skin-le
38f0: 76 65 6c 20 63 6f 6d 6d 61 6e 64 20 73 79 6e 74 vel command synt
3900: 61 78 20 64 69 66 66 65 72 65 6e 63 65 73 20 68 ax differences h
3910: 65 72 65 3b 20 74 68 65 20 64 69 66 66 65 72 65 ere; the differe
3920: 6e 63 65 73 20 67 6f 20 66 61 72 20 64 65 65 70 nces go far deep
3930: 65 72 2e 0d 0a 0d 0a 57 68 65 6e 20 79 6f 75 20 er.....When you
3940: 53 53 48 20 69 6e 74 6f 20 61 20 52 6f 75 74 65 SSH into a Route
3950: 72 4f 53 20 62 6f 78 2c 20 79 6f 75 e2 80 99 72 rOS box, you’r
3960: 65 20 6d 69 73 73 69 6e 67 20 6f 75 74 20 6f 6e e missing out on
3970: 20 61 20 6d 65 61 6e 69 6e 67 66 75 6c 20 64 69 a meaningful di
3980: 73 74 69 6e 63 74 69 6f 6e 20 62 65 74 77 65 65 stinction betwee
3990: 6e 20 73 74 64 6f 75 74 20 61 6e 64 20 73 74 64 n stdout and std
39a0: 65 72 72 2c 20 61 6e 64 20 74 68 65 20 6b 65 72 err, and the ker
39b0: 6e 65 6c e2 80 99 73 20 75 6e 64 65 72 6c 79 69 nel’s underlyi
39c0: 6e 67 20 74 65 72 6d 69 6f 73 2f 70 74 79 20 73 ng termios/pty s
39d0: 75 62 73 79 73 74 65 6d 20 69 73 20 68 69 64 64 ubsystem is hidd
39e0: 65 6e 20 66 72 6f 6d 20 79 6f 75 2e 20 54 68 65 en from you. The
39f0: 73 65 20 6c 61 63 6b 73 20 74 72 61 6e 73 6c 61 se lacks transla
3a00: 74 65 20 64 69 72 65 63 74 6c 79 20 69 6e 74 6f te directly into
3a10: 20 6c 69 6d 69 74 61 74 69 6f 6e 73 20 69 6e 20 limitations in
3a20: 74 68 65 20 61 62 69 6c 69 74 79 20 6f 66 20 60 the ability of `
3a30: 63 6f 6e 74 61 69 6e 65 72 2e 6e 70 6b 60 20 74 container.npk` t
3a40: 6f 20 6d 69 6d 69 63 20 74 68 65 20 65 78 70 65 o mimic the expe
3a50: 72 69 65 6e 63 65 20 6f 66 20 75 73 69 6e 67 20 rience of using
3a60: 44 6f 63 6b 65 72 20 61 74 20 74 68 65 20 63 6f Docker at the co
3a70: 6d 6d 61 6e 64 20 6c 69 6e 65 2e 0d 0a 0d 0a 4f mmand line.....O
3a80: 6e 65 20 6f 66 20 74 68 65 20 63 6f 72 65 20 52 ne of the core R
3a90: 6f 75 74 65 72 4f 53 20 64 65 73 69 67 6e 20 70 outerOS design p
3aa0: 72 69 6e 63 69 70 6c 65 73 20 69 73 20 62 65 69 rinciples is bei
3ab0: 6e 67 20 61 62 6c 65 20 74 6f 20 72 75 6e 20 68 ng able to run h
3ac0: 65 61 64 6c 65 73 73 6c 79 20 66 6f 72 20 6c 6f eadlessly for lo
3ad0: 6e 67 20 70 65 72 69 6f 64 73 2c 20 77 69 74 68 ng periods, with
3ae0: 20 74 68 65 20 61 64 6d 69 6e 69 73 74 72 61 74 the administrat
3af0: 6f 72 20 63 6f 6e 6e 65 63 74 69 6e 67 20 74 6f or connecting to
3b00: 20 74 68 65 69 72 20 76 69 72 74 75 61 6c 20 74 their virtual t
3b10: 65 72 6d 69 6e 61 6c 20 76 69 61 20 57 69 6e 42 erminal via WinB
3b20: 6f 78 2c 20 57 65 62 46 69 67 2c 20 6f 72 20 53 ox, WebFig, or S
3b30: 53 48 20 62 72 69 65 66 6c 79 2c 20 6f 6e 6c 79 SH briefly, only
3b40: 20 6c 6f 6e 67 20 65 6e 6f 75 67 68 20 74 6f 20 long enough to
3b50: 61 63 63 6f 6d 70 6c 69 73 68 20 73 6f 6d 65 20 accomplish some
3b60: 6e 65 74 77 6f 72 6b 20 61 64 6d 69 6e 20 74 61 network admin ta
3b70: 73 6b 20 62 65 66 6f 72 65 20 6c 6f 67 67 69 6e sk before loggin
3b80: 67 20 62 61 63 6b 20 6f 75 74 2e 20 54 68 65 20 g back out. The
3b90: 52 6f 75 74 65 72 4f 53 20 43 4c 49 20 6e 65 76 RouterOS CLI nev
3ba0: 65 72 20 77 61 73 20 6d 65 61 6e 74 20 74 6f 20 er was meant to
3bb0: 70 72 6f 76 69 64 65 20 74 68 65 20 73 6f 72 74 provide the sort
3bc0: 20 6f 66 20 72 69 63 68 20 74 65 72 6d 69 6e 61 of rich termina
3bd0: 6c 20 65 78 70 65 72 69 65 6e 63 65 20 79 6f 75 l experience you
3be0: 20 6e 65 65 64 20 77 68 65 6e 20 79 6f 75 20 77 need when you w
3bf0: 6f 72 6b 20 69 6e 20 61 20 4c 69 6e 75 78 20 74 ork in a Linux t
3c00: 65 72 6d 69 6e 61 6c 20 61 6c 6c 20 64 61 79 2c erminal all day,
3c10: 20 65 76 65 72 79 20 64 61 79 2e 0d 0a 0d 0a 54 every day.....T
3c20: 68 65 20 74 68 69 6e 67 20 69 73 2c 20 44 6f 63 he thing is, Doc
3c30: 6b 65 72 20 5f 77 61 73 5f 20 64 65 73 69 67 6e ker _was_ design
3c40: 65 64 20 61 72 6f 75 6e 64 20 74 68 69 73 20 73 ed around this s
3c50: 65 6e 73 69 62 69 6c 69 74 79 2e 0d 0a 0d 0a 49 ensibility.....I
3c60: 74 20 69 73 20 66 6f 72 20 74 68 69 73 20 69 6e t is for this in
3c70: 68 65 72 65 6e 74 20 72 65 61 73 6f 6e 20 74 68 herent reason th
3c80: 61 74 20 60 63 6f 6e 74 61 69 6e 65 72 2e 6e 70 at `container.np
3c90: 6b 60 20 63 61 6e 6e 6f 74 20 70 72 6f 76 69 64 k` cannot provid
3ca0: 65 20 65 71 75 69 76 61 6c 65 6e 74 73 20 6f 66 e equivalents of
3cb0: 20 44 6f 63 6b 65 72 e2 80 99 73 20 60 61 74 74 Docker’s `att
3cc0: 61 63 68 60 20 63 6f 6d 6d 61 6e 64 2c 20 6e 6f ach` command, no
3cd0: 72 20 69 74 73 20 e2 80 9c 60 64 6f 63 6b 65 72 r its “`docker
3ce0: 20 72 75 6e 20 2d 2d 61 74 74 61 63 68 60 e2 80 run --attach`
3cf0: 9d 20 66 6c 61 67 2c 20 6e 6f 72 20 74 68 65 20 flag, nor the
3d00: 63 6f 6d 6d 6f 6e 20 e2 80 9c 60 64 6f 63 6b 65 common “`docke
3d10: 72 20 72 75 6e 20 2d 69 74 60 e2 80 9d 20 6f 70 r run -it`” op
3d20: 74 69 6f 6e 20 70 61 69 72 2e 20 54 68 65 20 63 tion pair. The c
3d30: 6c 6f 73 65 73 74 20 69 74 20 63 6f 6d 65 73 20 losest it comes
3d40: 74 6f 20 61 6c 6c 20 74 68 69 73 20 69 73 20 69 to all this is i
3d50: 74 73 20 5b 60 73 68 65 6c 6c 60 5d 28 23 73 68 ts [`shell`](#sh
3d60: 65 6c 6c 29 20 63 6f 6d 6d 61 6e 64 20 69 6d 70 ell) command imp
3d70: 6c 65 6d 65 6e 74 61 74 69 6f 6e 2c 20 77 68 69 lementation, whi
3d80: 63 68 20 63 61 6e 20 63 6f 6e 6e 65 63 74 20 79 ch can connect y
3d90: 6f 75 72 20 6c 6f 63 61 6c 20 74 65 72 6d 69 6e our local termin
3da0: 61 6c 20 74 6f 20 61 20 74 72 75 65 20 72 65 6d al to a true rem
3db0: 6f 74 65 20 4c 69 6e 75 78 20 74 65 72 6d 69 6e ote Linux termin
3dc0: 61 6c 20 73 75 62 73 79 73 74 65 6d 2e 20 41 6c al subsystem. Al
3dd0: 61 73 2c 20 74 68 61 74 20 69 73 6e e2 80 99 74 as, that isn’t
3de0: 20 61 20 63 6c 6f 73 65 20 e2 80 9c 60 72 75 6e a close “`run
3df0: 20 2d 69 74 60 e2 80 9d 20 61 6c 74 65 72 6e 61 -it`” alterna
3e00: 74 69 76 65 20 62 65 63 61 75 73 65 20 79 6f 75 tive because you
3e10: e2 80 99 72 65 20 6c 65 66 74 20 74 79 70 69 6e ’re left typin
3e20: 67 20 63 6f 6d 6d 61 6e 64 73 20 61 74 20 74 68 g commands at th
3e30: 69 73 20 72 65 6d 6f 74 65 20 73 68 65 6c 6c 2c is remote shell,
3e40: 20 6e 6f 74 20 61 74 20 74 68 65 20 63 6f 6e 74 not at the cont
3e50: 61 69 6e 65 72 e2 80 99 73 20 60 45 4e 54 52 59 ainer’s `ENTRY
3e60: 50 4f 49 4e 54 60 20 70 72 6f 63 65 73 73 2e 20 POINT` process.
3e70: 45 76 65 6e 20 74 68 65 6e 2c 20 69 74 20 64 6f Even then, it do
3e80: 65 73 6e e2 80 99 74 20 61 6c 77 61 79 73 20 77 esn’t always w
3e90: 6f 72 6b 20 73 69 6e 63 65 20 61 20 67 6f 6f 64 ork since a good
3ea0: 20 6d 61 6e 79 20 63 6f 6e 74 61 69 6e 65 72 73 many containers
3eb0: 20 6c 61 63 6b 20 61 20 60 2f 62 69 6e 2f 73 68 lack a `/bin/sh
3ec0: 60 20 70 72 6f 67 72 61 6d 20 69 6e 73 69 64 65 ` program inside
3ed0: 20 74 68 65 20 63 6f 6e 74 61 69 6e 65 72 20 69 the container i
3ee0: 6e 20 74 68 65 20 66 69 72 73 74 20 70 6c 61 63 n the first plac
3ef0: 65 2c 20 6f 6e 20 70 75 72 70 6f 73 65 2c 20 74 e, on purpose, t
3f00: 79 70 69 63 61 6c 6c 79 20 74 6f 20 72 65 64 75 ypically to redu
3f10: 63 65 20 74 68 65 20 63 6f 6e 74 61 69 6e 65 72 ce the container
3f20: e2 80 99 73 20 61 74 74 61 63 6b 20 73 75 72 66 ’s attack surf
3f30: 61 63 65 2e 28 5e 49 6e 64 65 65 64 2c 20 61 6c ace.(^Indeed, al
3f40: 6c 20 6f 66 20 5b 6d 79 20 70 75 62 6c 69 63 20 l of [my public
3f50: 63 6f 6e 74 61 69 6e 65 72 73 5d 28 68 74 74 70 containers](http
3f60: 73 3a 2f 2f 68 75 62 2e 64 6f 63 6b 65 72 2e 63 s://hub.docker.c
3f70: 6f 6d 2f 72 65 70 6f 73 69 74 6f 72 69 65 73 2f om/repositories/
3f80: 74 61 6e 67 65 6e 74 73 6f 66 74 29 20 65 6c 69 tangentsoft) eli
3f90: 64 65 20 74 68 65 20 73 68 65 6c 6c 20 66 6f 72 de the shell for
3fa0: 20 74 68 69 73 20 72 65 61 73 6f 6e 2e 29 0d 0a this reason.)..
3fb0: 0d 0a 0d 0a 23 20 3c 61 20 69 64 3d 22 6c 6f 67 ....# <a id="log
3fc0: 73 22 3e 3c 2f 61 3e 4c 6f 67 20 48 61 6e 64 6c s"></a>Log Handl
3fd0: 69 6e 67 0d 0a 0d 0a 41 6c 74 68 6f 75 67 68 20 ing....Although
3fe0: 44 6f 63 6b 65 72 20 6c 6f 67 67 69 6e 67 20 69 Docker logging i
3ff0: 73 20 74 69 65 64 20 69 6e 74 6f 20 74 68 69 73 s tied into this
4000: 20 73 61 6d 65 20 4c 69 6e 75 78 20 74 65 72 6d same Linux term
4010: 69 6e 61 6c 20 49 2f 4f 20 64 65 73 69 67 6e 2c inal I/O design,
4020: 20 77 65 20 63 61 6e 6e 6f 74 20 62 6c 61 6d 65 we cannot blame
4030: 20 74 68 65 20 6c 61 63 6b 20 6f 66 20 61 6e 20 the lack of an
4040: 65 71 75 69 76 61 6c 65 6e 74 20 74 6f 20 e2 80 equivalent to
4050: 9c 60 64 6f 63 6b 65 72 20 6c 6f 67 73 60 e2 80 `docker logs`
4060: 9d 20 6f 6e 20 74 68 65 20 52 6f 75 74 65 72 4f on the RouterO
4070: 53 20 64 65 73 69 67 6e 20 70 72 69 6e 63 69 70 S design princip
4080: 6c 65 73 20 69 6e 20 74 68 65 20 73 61 6d 65 20 les in the same
4090: 6d 61 6e 6e 65 72 20 61 73 20 5b 61 62 6f 76 65 manner as [above
40a0: 5d 28 23 74 65 72 6d 69 6e 61 6c 29 2e 20 54 68 ](#terminal). Th
40b0: 65 20 63 61 75 73 65 20 68 65 72 65 20 69 73 20 e cause here is
40c0: 64 69 66 66 65 72 65 6e 74 2c 20 73 74 65 6d 6d different, stemm
40d0: 69 6e 67 20 66 69 72 73 74 20 66 72 6f 6d 20 74 ing first from t
40e0: 68 65 20 66 61 63 74 20 74 68 61 74 20 52 6f 75 he fact that Rou
40f0: 74 65 72 4f 53 20 62 6f 78 65 73 20 74 72 79 20 terOS boxes try
4100: 74 6f 20 6b 65 65 70 20 6c 6f 67 67 69 6e 67 20 to keep logging
4110: 74 6f 20 61 20 6d 69 6e 69 6d 75 6d 20 62 79 20 to a minimum by
4120: 64 65 66 61 75 6c 74 2c 20 77 68 65 72 65 61 73 default, whereas
4130: 20 44 6f 63 6b 65 72 20 6c 6f 67 73 20 65 76 65 Docker logs eve
4140: 72 79 74 68 69 6e 67 20 74 68 65 20 63 6f 6e 74 rything the cont
4150: 61 69 6e 65 72 20 73 61 79 73 2c 20 77 69 74 68 ainer says, with
4160: 6f 75 74 20 72 65 73 74 72 69 63 74 69 6f 6e 2e out restriction.
4170: 20 52 6f 75 74 65 72 4f 53 20 74 61 6b 65 73 20 RouterOS takes
4180: 74 68 65 20 73 75 72 70 72 69 73 69 6e 67 20 64 the surprising d
4190: 65 66 61 75 6c 74 20 6f 66 20 6c 6f 67 67 69 6e efault of loggin
41a0: 67 20 74 6f 20 76 6f 6c 61 74 69 6c 65 20 52 41 g to volatile RA
41b0: 4d 20 69 6e 20 6f 72 64 65 72 20 74 6f 20 61 76 M in order to av
41c0: 6f 69 64 20 62 75 72 6e 69 6e 67 20 6f 75 74 20 oid burning out
41d0: 74 68 65 20 66 6c 61 73 68 2e 20 41 64 64 69 74 the flash. Addit
41e0: 69 6f 6e 61 6c 6c 79 2c 20 69 74 20 69 67 6e 6f ionally, it igno
41f0: 72 65 73 20 61 6c 6c 20 6d 65 73 73 61 67 65 73 res all messages
4200: 20 69 73 73 75 65 64 20 75 6e 64 65 72 20 e2 80 issued under
4210: 9c 74 6f 70 69 63 73 e2 80 9d 20 6f 74 68 65 72 topics” other
4220: 20 74 68 61 6e 20 74 68 65 20 66 6f 75 72 20 70 than the four p
4230: 72 65 63 6f 6e 66 69 67 75 72 65 64 20 62 79 20 reconfigured by
4240: 64 65 66 61 75 6c 74 2c 20 77 68 69 63 68 20 64 default, which d
4250: 6f 65 73 20 6e 6f 74 20 69 6e 63 6c 75 64 65 20 oes not include
4260: 74 68 65 20 e2 80 9c 63 6f 6e 74 61 69 6e 65 72 the “container
4270: e2 80 9d 20 74 6f 70 69 63 20 79 6f 75 20 67 65 ” topic you ge
4280: 74 20 61 63 63 65 73 73 20 74 6f 20 62 79 20 69 t access to by i
4290: 6e 73 74 61 6c 6c 69 6e 67 20 60 63 6f 6e 74 61 nstalling `conta
42a0: 69 6e 65 72 2e 6e 70 6b 60 2e 0d 0a 0d 0a 54 6f iner.npk`.....To
42b0: 20 70 72 65 76 65 6e 74 20 79 6f 75 72 20 63 6f prevent your co
42c0: 6e 74 61 69 6e 65 72 73 e2 80 99 20 6c 6f 67 20 ntainers’ log
42d0: 6d 65 73 73 61 67 65 73 20 66 72 6f 6d 20 62 65 messages from be
42e0: 69 6e 67 20 73 65 6e 74 20 73 74 72 61 69 67 68 ing sent straigh
42f0: 74 20 74 6f 20 74 68 65 20 62 69 74 20 62 75 63 t to the bit buc
4300: 6b 65 74 2c 20 79 6f 75 20 6d 75 73 74 20 73 61 ket, you must sa
4310: 79 3a 0d 0a 0d 0a 20 20 20 20 2f 63 6f 6e 74 61 y:.... /conta
4320: 69 6e 65 72 2f 7b 61 64 64 2c 73 65 74 7d 20 e2 iner/{add,set}
4330: 80 a6 20 6c 6f 67 67 69 6e 67 3d 79 65 73 0d 0a logging=yes..
4340: 20 20 20 20 2f 73 79 73 74 65 6d 2f 6c 6f 67 67 /system/logg
4350: 69 6e 67 20 61 64 64 20 74 6f 70 69 63 73 3d 63 ing add topics=c
4360: 6f 6e 74 61 69 6e 65 72 20 61 63 74 69 6f 6e 3d ontainer action=
4370: e2 80 a6 0d 0a 0d 0a 48 61 76 69 6e 67 20 64 6f …....Having do
4380: 6e 65 20 73 6f 2c 20 77 65 20 68 61 76 65 20 61 ne so, we have a
4390: 20 6e 65 77 20 6c 69 6d 69 74 61 74 69 6f 6e 20 new limitation
43a0: 74 6f 20 63 6f 6e 74 65 6e 64 20 77 69 74 68 3a to contend with:
43b0: 20 52 6f 75 74 65 72 4f 53 20 6c 6f 67 67 69 6e RouterOS loggin
43c0: 67 20 69 73 6e e2 80 99 74 20 61 73 20 70 6f 77 g isn’t as pow
43d0: 65 72 66 75 6c 20 61 73 20 74 68 65 20 44 6f 63 erful as the Doc
43e0: 6b 65 72 20 e2 80 9c 60 6c 6f 67 73 60 e2 80 9d ker “`logs`”
43f0: 20 63 6f 6d 6d 61 6e 64 2c 20 77 68 69 63 68 20 command, which
4400: 62 79 20 64 65 66 61 75 6c 74 20 77 6f 72 6b 73 by default works
4410: 20 61 73 20 69 66 20 79 6f 75 20 61 73 6b 65 64 as if you asked
4420: 20 69 74 2c 20 e2 80 9c 54 65 6c 6c 20 6d 65 20 it, “Tell me
4430: 77 68 61 74 20 74 68 69 73 20 70 61 72 74 69 63 what this partic
4440: 75 6c 61 72 20 63 6f 6e 74 61 69 6e 65 72 20 6c ular container l
4450: 6f 67 67 65 64 20 73 69 6e 63 65 20 74 68 65 20 ogged since the
4460: 6c 61 73 74 20 74 69 6d 65 20 49 20 61 73 6b 65 last time I aske
4470: 64 2e e2 80 9d 20 52 6f 75 74 65 72 4f 53 20 6c d.” RouterOS l
4480: 6f 67 67 69 6e 67 2c 20 6f 6e 20 74 68 65 20 6f ogging, on the o
4490: 74 68 65 72 20 68 61 6e 64 2c 20 6d 69 78 65 73 ther hand, mixes
44a0: 20 65 76 65 72 79 74 68 69 6e 67 20 74 6f 67 65 everything toge
44b0: 74 68 65 72 20 69 6e 20 72 65 61 6c 20 74 69 6d ther in real tim
44c0: 65 2c 20 72 65 71 75 69 72 69 6e 67 20 79 6f 75 e, requiring you
44d0: 20 74 6f 20 64 69 67 20 74 68 72 6f 75 67 68 20 to dig through
44e0: 74 68 65 20 68 69 73 74 6f 72 79 20 6d 61 6e 75 the history manu
44f0: 61 6c 6c 79 2e 0d 0a 0d 0a 28 54 68 65 20 73 61 ally.....(The sa
4500: 6d 65 20 69 73 20 74 72 75 65 20 6f 66 20 60 70 me is true of `p
4510: 6f 64 6d 61 6e 20 6c 6f 67 73 60 2c 20 65 78 63 odman logs`, exc
4520: 65 70 74 20 74 68 61 74 20 69 74 20 74 69 65 73 ept that it ties
4530: 20 69 6e 74 6f 20 73 79 73 74 65 6d 64 e2 80 99 into systemd’
4540: 73 20 75 6e 69 66 69 65 64 20 e2 80 9c 6a 6f 75 s unified “jou
4550: 72 6e 61 6c e2 80 9d 20 73 75 62 73 79 73 74 65 rnal” subsyste
4560: 6d 2c 20 61 20 63 6f 6e 74 72 6f 76 65 72 73 69 m, a controversi
4570: 61 6c 20 64 65 73 69 67 6e 20 63 68 6f 69 63 65 al design choice
4580: 20 74 68 61 74 20 65 6e 64 65 64 20 75 70 20 70 that ended up p
4590: 61 79 69 6e 67 20 6f 66 66 20 68 61 6e 64 73 6f aying off handso
45a0: 6d 65 6c 79 20 77 68 65 6e 20 50 6f 64 6d 61 6e mely when Podman
45b0: 20 63 61 6d 65 20 61 6c 6f 6e 67 20 61 6e 64 20 came along and
45c0: 77 61 6e 74 65 64 20 74 6f 20 70 75 6c 6c 20 75 wanted to pull u
45d0: 70 20 70 65 72 2d 63 6f 6e 74 61 69 6e 65 72 20 p per-container
45e0: 6c 6f 67 73 20 74 6f 20 6d 61 74 63 68 20 74 68 logs to match th
45f0: 65 20 77 61 79 20 44 6f 63 6b 65 72 20 62 65 68 e way Docker beh
4600: 61 76 65 64 2e 29 0d 0a 0d 0a 0d 0a 23 20 3c 61 aved.)......# <a
4610: 20 69 64 3d 22 63 70 75 22 3e 3c 2f 61 3e 43 50 id="cpu"></a>CP
4620: 55 20 4c 69 6d 69 74 61 74 69 6f 6e 73 0d 0a 0d U Limitations...
4630: 0a 54 68 69 73 20 6c 69 6d 69 74 61 74 69 6f 6e .This limitation
4640: 20 63 6f 6d 65 73 20 69 6e 20 74 77 6f 20 73 75 comes in two su
4650: 62 63 6c 61 73 73 65 73 3a 0d 0a 0d 0a 0d 0a 23 bclasses:......#
4660: 23 20 3c 61 20 69 64 3d 22 65 6d 75 22 3e 3c 2f # <a id="emu"></
4670: 61 3e 54 68 65 72 65 20 49 73 20 4e 6f 20 42 75 a>There Is No Bu
4680: 69 6c 74 2d 49 6e 20 43 50 55 20 45 6d 75 6c 61 ilt-In CPU Emula
4690: 74 69 6f 6e 0d 0a 0d 0a 44 6f 63 6b 65 72 20 6c tion....Docker l
46a0: 65 74 73 20 79 6f 75 20 72 75 6e 20 61 6e 20 69 ets you run an i
46b0: 6d 61 67 65 20 62 75 69 6c 74 20 66 6f 72 20 61 mage built for a
46c0: 6e 6f 74 68 65 72 20 61 72 63 68 69 74 65 63 74 nother architect
46d0: 75 72 65 20 6f 6e 20 79 6f 75 72 20 6c 6f 63 61 ure on your loca
46e0: 6c 20 73 79 73 74 65 6d 20 74 68 72 6f 75 67 68 l system through
46f0: 20 74 72 61 6e 73 70 61 72 65 6e 74 20 43 50 55 transparent CPU
4700: 20 65 6d 75 6c 61 74 69 6f 6e 2e 20 49 66 20 79 emulation. If y
4710: 6f 75 20 61 72 65 20 6f 6e 20 61 6e 20 78 38 36 ou are on an x86
4720: 5f 36 34 20 68 6f 73 74 2c 20 74 68 69 73 20 63 _64 host, this c
4730: 6f 6d 6d 61 6e 64 20 73 68 6f 75 6c 64 20 64 72 ommand should dr
4740: 6f 70 20 79 6f 75 20 69 6e 74 6f 20 61 6e 20 41 op you into an A
4750: 6c 70 69 6e 65 20 73 68 65 6c 6c 3a 0d 0a 0d 0a lpine shell:....
4760: 20 20 20 20 20 24 20 64 6f 63 6b 65 72 20 72 75 $ docker ru
4770: 6e 20 2d 2d 72 6d 20 2d 69 74 20 2d 2d 70 6c 61 n --rm -it --pla
4780: 74 66 6f 72 6d 20 6c 69 6e 75 78 2f 61 72 6d 36 tform linux/arm6
4790: 34 20 61 6c 70 69 6e 65 3a 6c 61 74 65 73 74 0d 4 alpine:latest.
47a0: 0a 0d 0a 54 68 65 20 73 61 6d 65 20 77 69 6c 6c ...The same will
47b0: 20 77 6f 72 6b 20 6f 6e 20 72 65 63 65 6e 74 20 work on recent
47c0: 76 65 72 73 69 6f 6e 73 20 6f 66 20 50 6f 64 6d versions of Podm
47d0: 61 6e 2c 20 61 6e 64 20 79 6f 75 20 63 61 6e 20 an, and you can
47e0: 67 65 74 20 69 74 20 74 6f 20 77 6f 72 6b 20 6f get it to work o
47f0: 6e 20 6f 6c 64 20 76 65 72 73 69 6f 6e 73 20 6f n old versions o
4800: 66 20 50 6f 64 6d 61 6e 20 77 69 74 68 20 61 20 f Podman with a
4810: 62 69 74 20 6f 66 20 6d 61 6e 75 61 6c 20 73 65 bit of manual se
4820: 74 75 70 2e 28 5e 49 74 e2 80 99 73 20 6f 66 66 tup.(^It’s off
4830: 2d 74 6f 70 69 63 20 74 6f 20 67 6f 20 69 6e 74 -topic to go int
4840: 6f 20 74 68 65 20 64 65 74 61 69 6c 73 20 68 65 o the details he
4850: 72 65 2c 20 62 75 74 20 69 74 20 61 6d 6f 75 6e re, but it amoun
4860: 74 73 20 74 6f 20 e2 80 9c 60 70 6f 64 6d 61 6e ts to “`podman
4870: 20 6d 61 63 68 69 6e 65 20 73 73 68 60 e2 80 9d machine ssh`”
4880: 20 66 6f 6c 6c 6f 77 65 64 20 62 79 20 61 20 e2 followed by a
4890: 80 9c 60 64 6e 66 20 69 6e 73 74 61 6c 6c 20 71 `dnf install q
48a0: 65 6d 75 2d 73 74 61 74 69 63 2d 2a 60 e2 80 9d emu-static-*`”
48b0: 20 63 6f 6d 6d 61 6e 64 2e 29 0d 0a 0d 0a 46 6f command.)....Fo
48c0: 72 20 74 68 61 74 20 74 6f 20 77 6f 72 6b 20 75 r that to work u
48d0: 6e 64 65 72 20 60 63 6f 6e 74 61 69 6e 65 72 2e nder `container.
48e0: 6e 70 6b 60 2c 20 74 68 65 20 52 6f 75 74 65 72 npk`, the Router
48f0: 4f 53 20 64 65 76 65 6c 6f 70 65 72 73 20 77 6f OS developers wo
4900: 75 6c 64 20 68 61 76 65 20 74 6f 20 73 68 69 70 uld have to ship
4910: 20 74 68 65 20 51 45 4d 55 20 61 6e 64 20 4c 69 the QEMU and Li
4920: 6e 75 78 20 6b 65 72 6e 65 6c 20 5b 60 62 69 6e nux kernel [`bin
4930: 66 6d 74 5f 6d 69 73 63 60 5d 28 68 74 74 70 73 fmt_misc`](https
4940: 3a 2f 2f 65 6e 2e 77 69 6b 69 70 65 64 69 61 2e ://en.wikipedia.
4950: 6f 72 67 2f 77 69 6b 69 2f 42 69 6e 66 6d 74 5f org/wiki/Binfmt_
4960: 6d 69 73 63 29 20 62 72 69 64 67 65 73 20 6e 65 misc) bridges ne
4970: 65 64 65 64 20 74 6f 20 67 65 74 20 74 68 65 20 eded to get the
4980: 4f 53 20 74 6f 20 61 63 63 65 70 74 20 74 68 65 OS to accept the
4990: 73 65 20 e2 80 9c 66 6f 72 65 69 67 6e e2 80 9d se “foreign”
49a0: 20 62 69 6e 61 72 69 65 73 2e 20 53 69 6e 63 65 binaries. Since
49b0: 20 69 74 20 77 6f 75 6c 64 20 61 70 70 72 6f 78 it would approx
49c0: 69 6d 61 74 65 6c 79 20 64 6f 75 62 6c 65 20 74 imately double t
49d0: 68 65 20 73 69 7a 65 20 6f 66 20 52 6f 75 74 65 he size of Route
49e0: 72 4f 53 20 74 6f 20 64 6f 20 74 68 69 73 20 66 rOS to do this f
49f0: 6f 72 20 61 6c 6c 20 74 68 65 20 70 6f 70 75 6c or all the popul
4a00: 61 72 20 43 50 55 20 61 72 63 68 69 74 65 63 74 ar CPU architect
4a10: 75 72 65 73 2c 20 74 68 65 79 20 6e 61 74 75 72 ures, they natur
4a20: 61 6c 6c 79 20 63 68 6f 73 65 20 5f 6e 6f 74 5f ally chose _not_
4a30: 20 74 6f 20 64 6f 20 74 68 69 73 2e 0d 0a 0d 0a to do this.....
4a40: 57 68 61 74 20 74 68 69 73 20 6d 65 61 6e 73 20 What this means
4a50: 69 6e 20 70 72 61 63 74 69 63 65 20 69 73 20 74 in practice is t
4a60: 68 61 74 20 79 6f 75 20 68 61 76 65 20 74 6f 20 hat you have to
4a70: 62 65 20 73 75 72 65 20 74 68 65 20 69 6d 61 67 be sure the imag
4a80: 65 73 20 79 6f 75 20 77 61 6e 74 20 74 6f 20 75 es you want to u
4a90: 73 65 20 77 65 72 65 20 62 75 69 6c 74 20 66 6f se were built fo
4aa0: 72 20 74 68 65 20 43 50 55 20 74 79 70 65 20 69 r the CPU type i
4ab0: 6e 20 79 6f 75 72 20 52 6f 75 74 65 72 4f 53 20 n your RouterOS
4ac0: 64 65 76 69 63 65 2e 20 54 68 69 73 20 69 73 20 device. This is
4ad0: 74 72 75 65 20 65 76 65 6e 20 62 65 74 77 65 65 true even betwee
4ae0: 6e 20 63 6c 6f 73 65 6c 79 2d 72 65 6c 61 74 65 n closely-relate
4af0: 64 20 70 6c 61 74 66 6f 72 6d 73 2e 20 41 6e 20 d platforms. An
4b00: 41 52 4d 36 34 20 72 6f 75 74 65 72 20 77 6f 6e ARM64 router won
4b10: e2 80 99 74 20 72 75 6e 20 61 20 33 32 2d 62 69 ’t run a 32-bi
4b20: 74 20 41 52 4d 76 37 20 69 6d 61 67 65 2c 20 69 t ARMv7 image, i
4b30: 66 20 6f 6e 6c 79 20 62 65 63 61 75 73 65 20 69 f only because i
4b40: 74 20 77 69 6c 6c 20 61 73 73 75 6d 65 20 61 20 t will assume a
4b50: 33 32 2d 62 69 74 20 4c 69 6e 75 78 20 6b 65 72 32-bit Linux ker
4b60: 6e 65 6c 20 73 79 73 63 61 6c 6c 20 69 6e 74 65 nel syscall inte
4b70: 72 66 61 63 65 2e 0d 0a 0d 0a 3c 61 20 69 64 3d rface.....<a id=
4b80: 22 71 65 6d 75 22 3e 3c 2f 61 3e 54 68 65 72 65 "qemu"></a>There
4b90: 20 69 73 20 61 6e 20 65 78 63 65 70 74 69 6f 6e is an exception
4ba0: 3a 20 79 6f 75 20 63 61 6e 20 73 68 69 70 20 79 : you can ship y
4bb0: 6f 75 72 20 6f 77 6e 20 43 50 55 20 65 6d 75 6c our own CPU emul
4bc0: 61 74 69 6f 6e 2e 20 54 61 6b 65 20 5b 74 68 69 ation. Take [thi
4bd0: 73 20 74 68 72 65 61 64 5d 28 68 74 74 70 73 3a s thread](https:
4be0: 2f 2f 66 6f 72 75 6d 2e 6d 69 6b 72 6f 74 69 6b //forum.mikrotik
4bf0: 2e 63 6f 6d 2f 76 69 65 77 74 6f 70 69 63 2e 70 .com/viewtopic.p
4c00: 68 70 3f 74 3d 31 38 39 34 38 35 29 2c 20 66 6f hp?t=189485), fo
4c10: 72 20 65 78 61 6d 70 6c 65 2c 20 77 68 69 63 68 r example, which
4c20: 20 64 65 73 63 72 69 62 65 73 20 61 20 63 6f 6e describes a con
4c30: 74 61 69 6e 65 72 20 74 68 61 74 20 62 75 6e 64 tainer that bund
4c40: 6c 65 73 20 74 68 65 20 33 32 2d 62 69 74 20 49 les the 32-bit I
4c50: 6e 74 65 6c 2d 63 6f 6d 70 69 6c 65 64 20 60 6e ntel-compiled `n
4c60: 65 74 69 6e 73 74 61 6c 6c 2d 63 6c 69 60 20 4c etinstall-cli` L
4c70: 69 6e 75 78 20 62 69 6e 61 72 79 20 61 6c 6f 6e inux binary alon
4c80: 67 20 77 69 74 68 20 61 6e 20 41 52 4d 20 62 75 g with an ARM bu
4c90: 69 6c 64 20 6f 66 20 6f 66 20 60 71 65 6d 75 2d ild of of `qemu-
4ca0: 69 33 38 36 60 20 73 6f 20 74 68 61 74 20 69 74 i386` so that it
4cb0: 20 77 69 6c 6c 20 72 75 6e 20 6f 6e 20 41 52 4d will run on ARM
4cc0: 20 52 6f 75 74 65 72 4f 53 20 62 6f 78 65 73 2e RouterOS boxes.
4cd0: 20 46 6f 72 20 61 20 70 72 6f 63 65 73 73 20 74 For a process t
4ce0: 68 61 74 20 69 73 6e e2 80 99 74 20 43 50 55 2d hat isn’t CPU-
4cf0: 62 6f 75 6e 64 20 e2 80 94 20 61 6e 64 20 4e 65 bound — and Ne
4d00: 74 49 6e 73 74 61 6c 6c 20 69 73 20 76 65 72 79 tInstall is very
4d10: 20 6d 75 63 68 20 49 2f 4f 2d 62 6f 75 6e 64 20 much I/O-bound
4d20: e2 80 94 20 74 68 69 73 20 63 61 6e 20 62 65 20 — this can be
4d30: 61 20 72 65 61 73 6f 6e 61 62 6c 65 20 73 6f 6c a reasonable sol
4d40: 75 74 69 6f 6e 20 61 73 20 6c 6f 6e 67 20 61 73 ution as long as
4d50: 20 79 6f 75 e2 80 99 72 65 20 77 69 6c 6c 69 6e you’re willin
4d60: 67 20 74 6f 20 70 61 79 20 74 68 65 20 7e 34 20 g to pay the ~4
4d70: 6d 65 67 73 20 74 68 65 20 65 6d 75 6c 61 74 6f megs the emulato
4d80: 72 20 74 61 6b 65 73 20 75 70 2e 0d 0a 0d 0a 0d r takes up......
4d90: 0a 23 23 20 3c 61 20 69 64 3d 22 63 6f 6d 70 61 .## <a id="compa
4da0: 74 22 3e 3c 2f 61 3e 49 74 20 4f 6e 6c 79 20 53 t"></a>It Only S
4db0: 75 70 70 6f 72 74 73 20 49 6e 74 65 6c 20 61 6e upports Intel an
4dc0: 64 20 41 52 4d 0d 0a 0d 0a 4d 69 6b 72 6f 54 69 d ARM....MikroTi
4dd0: 6b 20 68 61 73 20 73 68 69 70 70 65 64 20 61 6e k has shipped an
4de0: 20 61 77 66 75 6c 20 6c 6f 74 20 6f 66 20 4d 49 awful lot of MI
4df0: 50 53 2d 62 61 73 65 64 20 70 72 6f 64 75 63 74 PS-based product
4e00: 20 6f 76 65 72 20 74 68 65 20 79 65 61 72 73 2c over the years,
4e10: 20 61 6e 64 20 69 74 20 63 6f 6e 74 69 6e 75 65 and it continue
4e20: 73 20 74 6f 20 64 6f 20 73 6f 2c 20 6d 6f 73 74 s to do so, most
4e30: 20 72 65 63 65 6e 74 6c 79 20 61 73 20 6f 66 20 recently as of
4e40: 74 68 69 73 20 77 72 69 74 69 6e 67 20 69 6e 20 this writing in
4e50: 74 68 65 69 72 20 5b 43 52 53 35 31 38 2d 31 36 their [CRS518-16
4e60: 58 53 2d 32 58 51 2d 52 4d 5d 28 68 74 74 70 73 XS-2XQ-RM](https
4e70: 3a 2f 2f 6d 69 6b 72 6f 74 69 6b 2e 63 6f 6d 2f ://mikrotik.com/
4e80: 70 72 6f 64 75 63 74 2f 63 72 73 35 31 38 5f 31 product/crs518_1
4e90: 36 78 73 5f 32 78 71 29 2e 20 41 74 6f 70 20 74 6xs_2xq). Atop t
4ea0: 68 61 74 2c 20 74 68 65 72 65 20 61 72 65 20 6f hat, there are o
4eb0: 74 68 65 72 20 43 50 55 20 61 72 63 68 69 74 65 ther CPU archite
4ec0: 63 74 75 72 65 73 20 69 6e 20 74 68 65 20 68 69 ctures in the hi
4ed0: 73 74 6f 72 69 63 61 6c 20 6d 69 78 20 6c 69 6b storical mix lik
4ee0: 65 20 50 6f 77 65 72 50 43 20 61 6e 64 20 54 49 e PowerPC and TI
4ef0: 4c 45 2e 20 4d 69 6b 72 6f 54 69 6b 20 64 6f 65 LE. MikroTik doe
4f00: 73 6e e2 80 99 74 20 73 68 69 70 20 61 20 60 63 sn’t ship a `c
4f10: 6f 6e 74 61 69 6e 65 72 2e 6e 70 6b 60 20 66 6f ontainer.npk` fo
4f20: 72 20 61 6e 79 20 6f 66 20 74 68 65 73 65 20 70 r any of these p
4f30: 6c 61 74 66 6f 72 6d 73 2e 0d 0a 0d 0a 42 75 74 latforms.....But
4f40: 20 77 68 79 20 6e 6f 74 3f 0d 0a 0d 0a 54 6f 20 why not?....To
4f50: 62 72 69 6e 67 20 75 70 20 65 61 63 68 20 6e 65 bring up each ne
4f60: 77 20 62 75 69 6c 64 20 74 61 72 67 65 74 2c 20 w build target,
4f70: 74 68 65 20 63 72 65 61 74 6f 72 73 20 6f 66 20 the creators of
4f80: 79 6f 75 72 20 63 6f 6e 74 61 69 6e 65 72 20 62 your container b
4f90: 75 69 6c 64 20 74 6f 6f 6c 63 68 61 69 6e 20 6f uild toolchain o
4fa0: 66 20 63 68 6f 69 63 65 20 6d 75 73 74 20 62 72 f choice must br
4fb0: 69 6e 67 20 74 6f 67 65 74 68 65 72 3a 0d 0a 0d ing together:...
4fc0: 0a 2a 20 61 20 51 45 4d 55 20 65 6d 75 6c 61 74 .* a QEMU emulat
4fd0: 6f 72 20 66 6f 72 20 74 68 65 20 74 61 72 67 65 or for the targe
4fe0: 74 20 73 79 73 74 65 6d 0d 0a 2a 20 61 20 73 75 t system..* a su
4ff0: 66 66 69 63 69 65 6e 74 6c 79 20 63 6f 6d 70 6c fficiently compl
5000: 65 74 65 20 4c 69 6e 75 78 20 64 69 73 74 72 6f ete Linux distro
5010: 20 70 6f 72 74 65 64 20 74 6f 20 74 68 61 74 20 ported to that
5020: 74 61 72 67 65 74 0d 0a 2a 20 74 68 65 20 60 62 target..* the `b
5030: 69 6e 66 6d 74 5f 6d 69 73 63 60 20 6b 65 72 6e infmt_misc` kern
5040: 65 6c 20 6d 6f 64 75 6c 65 73 20 74 68 61 74 20 el modules that
5050: 74 69 65 20 74 68 65 73 65 20 74 77 6f 20 74 6f tie these two to
5060: 67 65 74 68 65 72 0d 0a 0d 0a 51 45 4d 55 20 69 gether....QEMU i
5070: 73 20 e2 80 9c 65 61 73 79 e2 80 9d 20 69 6e 20 s “easy” in
5080: 74 68 65 20 73 65 6e 73 65 20 74 68 61 74 20 74 the sense that t
5090: 68 65 20 68 61 72 64 20 77 6f 72 6b 20 68 61 73 he hard work has
50a0: 20 61 6c 72 65 61 64 79 20 62 65 65 6e 20 64 6f already been do
50b0: 6e 65 3b 20 74 68 65 72 65 20 61 72 65 20 51 45 ne; there are QE
50c0: 4d 55 20 65 6d 75 6c 61 74 6f 72 73 20 66 6f 72 MU emulators for
50d0: 20 65 76 65 72 79 20 43 50 55 20 74 79 70 65 20 every CPU type
50e0: 4d 69 6b 72 6f 54 69 6b 20 65 76 65 72 20 73 68 MikroTik ever sh
50f0: 69 70 70 65 64 2e 20 28 5b 44 65 74 61 69 6c 73 ipped. ([Details
5100: 5d 28 68 74 74 70 73 3a 2f 2f 77 77 77 2e 71 65 ](https://www.qe
5110: 6d 75 2e 6f 72 67 2f 64 6f 63 73 2f 6d 61 73 74 mu.org/docs/mast
5120: 65 72 2f 73 79 73 74 65 6d 2f 74 61 72 67 65 74 er/system/target
5130: 73 2e 68 74 6d 6c 29 29 20 54 68 65 72 65 e2 80 s.html)) There
5140: 99 73 20 61 20 70 61 72 74 69 61 6c 20 65 78 63 s a partial exc
5150: 65 70 74 69 6f 6e 20 77 69 74 68 20 54 49 4c 45 eption with TILE
5160: 2c 20 77 68 69 63 68 20 6f 6e 63 65 20 65 78 69 , which once exi
5170: 73 74 65 64 20 69 6e 20 51 45 4d 55 20 63 6f 72 sted in QEMU cor
5180: 65 20 62 75 74 20 68 61 73 20 62 65 65 6e 20 72 e but has been r
5190: 65 6d 6f 76 65 64 20 66 6f 72 20 79 65 61 72 73 emoved for years
51a0: 2c 20 66 6f 6c 6c 6f 77 69 6e 67 20 74 68 65 20 , following the
51b0: 72 65 6d 6f 76 61 6c 20 6f 66 20 54 49 4c 45 20 removal of TILE
51c0: 73 75 70 70 6f 72 74 20 66 72 6f 6d 20 74 68 65 support from the
51d0: 20 4c 69 6e 75 78 20 6b 65 72 6e 65 6c 2e 20 54 Linux kernel. T
51e0: 68 65 20 74 68 69 6e 67 20 69 73 2c 20 54 49 4c he thing is, TIL
51f0: 45 20 68 61 73 6e e2 80 99 74 20 70 72 6f 67 72 E hasn’t progr
5200: 65 73 73 65 64 20 69 6e 20 74 68 65 20 6d 65 61 essed in the mea
5210: 6e 74 69 6d 65 2c 20 73 6f 20 62 72 69 6e 67 69 ntime, so bringi
5220: 6e 67 20 75 70 20 61 20 51 45 4d 55 20 54 49 4c ng up a QEMU TIL
5230: 45 20 65 6d 75 6c 61 74 6f 72 20 73 68 6f 75 6c E emulator shoul
5240: 64 20 62 65 20 61 20 6d 61 74 74 65 72 20 6f 66 d be a matter of
5250: 20 70 75 74 74 69 6e 67 20 69 6e 20 74 68 65 20 putting in the
5260: 77 6f 72 6b 20 74 6f 20 70 6f 72 74 20 69 74 20 work to port it
5270: 74 6f 20 61 20 64 65 63 61 64 65 2d 6e 65 77 65 to a decade-newe
5280: 72 20 76 65 72 73 69 6f 6e 20 6f 66 20 4c 69 6e r version of Lin
5290: 75 78 2e 0d 0a 0d 0a 54 68 65 20 62 69 6e 66 6d ux.....The binfm
52a0: 74 20 70 69 65 63 65 20 69 73 20 61 6c 73 6f 20 t piece is also
52b0: 65 61 73 79 20 65 6e 6f 75 67 68 2e 0d 0a 0d 0a easy enough.....
52c0: 54 68 61 74 20 6c 65 61 76 65 73 20 74 68 65 20 That leaves the
52d0: 4c 69 6e 75 78 20 64 69 73 74 72 6f 73 20 66 6f Linux distros fo
52e0: 72 20 74 68 65 20 74 61 72 67 65 74 20 70 6c 61 r the target pla
52f0: 74 66 6f 72 6d 73 20 75 73 65 64 20 61 73 20 63 tforms used as c
5300: 6f 6e 74 61 69 6e 65 72 20 62 61 73 65 20 69 6d ontainer base im
5310: 61 67 65 73 2e 20 54 68 61 74 e2 80 99 73 20 74 ages. That’s t
5320: 68 65 20 74 72 75 65 20 73 74 69 63 6b 69 6e 67 he true sticking
5330: 20 70 6f 69 6e 74 2e 0d 0a 0d 0a 4f 6e 65 20 6f point.....One o
5340: 66 20 74 68 65 20 6d 6f 73 74 20 70 6f 77 65 72 f the most power
5350: 66 75 6c 20 69 64 65 61 73 20 69 6e 20 74 68 65 ful ideas in the
5360: 20 4f 43 49 20 63 6f 6e 74 61 69 6e 65 72 20 65 OCI container e
5370: 63 6f 73 70 68 65 72 65 20 69 73 20 74 68 61 74 cosphere is that
5380: 20 79 6f 75 20 64 6f 6e e2 80 99 74 20 63 72 6f you don’t cro
5390: 73 73 2d 63 6f 6d 70 69 6c 65 20 70 72 6f 67 72 ss-compile progr
53a0: 61 6d 73 2c 20 79 6f 75 20 62 6f 6f 74 20 61 6e ams, you boot an
53b0: 20 5f 65 78 69 73 74 69 6e 67 5f 20 4c 69 6e 75 _existing_ Linu
53c0: 78 20 64 69 73 74 72 6f 20 69 6d 61 67 65 20 66 x distro image f
53d0: 6f 72 20 74 68 65 20 74 61 72 67 65 74 20 70 6c or the target pl
53e0: 61 74 66 6f 72 6d 20 75 6e 64 65 72 20 51 45 4d atform under QEM
53f0: 55 2c 20 74 68 65 6e 20 75 73 65 20 74 68 65 20 U, then use the
5400: 6e 61 74 69 76 65 20 74 6f 6f 6c 69 6e 67 20 74 native tooling t
5410: 6f 20 70 72 6f 64 75 63 65 20 e2 80 9c 6e 61 74 o produce “nat
5420: 69 76 65 e2 80 9d 20 62 69 6e 61 72 69 65 73 2c ive” binaries,
5430: 20 77 68 69 63 68 20 74 68 65 20 60 62 69 6e 66 which the `binf
5440: 6d 74 5f 6d 69 73 63 60 20 70 69 65 63 65 20 74 mt_misc` piece t
5450: 68 65 6e 20 74 75 72 6e 73 20 62 61 63 6b 20 61 hen turns back a
5460: 72 6f 75 6e 64 20 61 6e 64 20 72 75 6e 73 20 75 round and runs u
5470: 6e 64 65 72 20 51 45 4d 55 20 61 67 61 69 6e 2e nder QEMU again.
5480: 0d 0a 0d 0a 49 74 e2 80 99 73 20 61 20 6c 6f 74 ....It’s a lot
5490: 20 6f 66 20 77 6f 72 6b 20 74 6f 20 67 65 74 20 of work to get
54a0: 61 20 73 69 6e 67 6c 65 20 6e 65 77 20 4c 69 6e a single new Lin
54b0: 75 78 20 64 69 73 74 72 6f 20 77 6f 72 6b 69 6e ux distro workin
54c0: 67 20 75 6e 64 65 72 20 60 62 75 69 6c 64 78 60 g under `buildx`
54d0: 2c 20 65 76 65 6e 20 69 66 20 79 6f 75 20 73 74 , even if you st
54e0: 61 72 74 20 77 69 74 68 20 61 6e 20 65 78 69 73 art with an exis
54f0: 74 69 6e 67 20 74 68 69 72 64 2d 70 61 72 74 79 ting third-party
5500: 20 70 6f 72 74 20 73 75 63 68 20 61 73 20 74 68 port such as th
5510: 65 20 4d 61 63 20 50 50 43 20 62 75 69 6c 64 73 e Mac PPC builds
5520: 20 6f 66 20 55 62 75 6e 74 75 2e 20 47 6f 6f 64 of Ubuntu. Good
5530: 20 6c 75 63 6b 20 69 66 20 79 6f 75 20 77 61 6e luck if you wan
5540: 74 20 74 6f 20 73 75 70 70 6f 72 74 20 61 6e 20 t to support an
5550: 6f 64 64 62 61 6c 6c 20 43 50 55 20 6c 69 6b 65 oddball CPU like
5560: 20 54 49 4c 45 2c 20 74 68 6f 75 67 68 2e 0d 0a TILE, though...
5570: 0d 0a 42 75 74 20 74 68 65 6e 2c 20 68 61 76 69 ..But then, havi
5580: 6e 67 20 64 6f 6e 65 20 73 6f 2c 20 79 6f 75 e2 ng done so, you
5590: 80 99 72 65 20 69 6e 20 61 20 66 72 65 73 68 20 re in a fresh
55a0: 6a 61 6d 20 77 68 65 6e 20 79 6f 75 20 74 72 79 jam when you try
55b0: 20 74 6f 20 72 65 62 75 69 6c 64 20 61 6e 20 65 to rebuild an e
55c0: 78 69 73 74 69 6e 67 20 63 6f 6e 74 61 69 6e 65 xisting containe
55d0: 72 20 74 68 61 74 20 73 61 79 73 20 e2 80 9c 60 r that says “`
55e0: 46 52 4f 4d 60 e2 80 9d 20 73 6f 6d 65 74 68 69 FROM`” somethi
55f0: 6e 67 20 65 6c 73 65 3b 20 60 75 62 69 39 60 2c ng else; `ubi9`,
5600: 20 66 6f 72 20 69 6e 73 74 61 6e 63 65 2e 20 44 for instance. D
5610: 6f 20 79 6f 75 20 72 65 70 65 61 74 20 61 6c 6c o you repeat all
5620: 20 74 68 61 74 20 70 6f 72 74 69 6e 67 20 77 6f that porting wo
5630: 72 6b 20 66 6f 72 20 52 48 45 4c e2 80 99 73 20 rk for RHEL’s
5640: 5b 55 42 49 5d 28 68 74 74 70 73 3a 2f 2f 77 77 [UBI](https://ww
5650: 77 2e 72 65 64 68 61 74 2e 63 6f 6d 2f 65 6e 2f w.redhat.com/en/
5660: 62 6c 6f 67 2f 69 6e 74 72 6f 64 75 63 69 6e 67 blog/introducing
5670: 2d 72 65 64 2d 68 61 74 2d 75 6e 69 76 65 72 73 -red-hat-univers
5680: 61 6c 2d 62 61 73 65 2d 69 6d 61 67 65 29 2c 20 al-base-image),
5690: 6f 72 20 64 6f 20 79 6f 75 20 65 78 70 65 6e 64 or do you expend
56a0: 20 74 68 65 20 6c 65 73 73 65 72 20 65 66 66 6f the lesser effo
56b0: 72 74 20 74 6f 20 70 6f 72 74 20 74 68 65 20 63 rt to port the c
56c0: 6f 6e 74 61 69 6e 65 72 20 66 72 6f 6d 20 52 48 ontainer from RH
56d0: 45 4c 20 74 6f 20 74 68 65 20 55 62 75 6e 74 75 EL to the Ubuntu
56e0: 20 69 6d 61 67 65 20 62 61 73 65 20 79 6f 75 20 image base you
56f0: 61 6c 72 65 61 64 79 20 68 61 76 65 3f 0d 0a 0d already have?...
5700: 0a 54 68 65 6e 20 79 6f 75 20 63 6f 6d 65 20 61 .Then you come a
5710: 63 72 6f 73 73 20 6f 6e 65 20 6f 66 20 74 68 65 cross one of the
5720: 20 68 75 67 65 20 6e 75 6d 62 65 72 20 6f 66 20 huge number of
5730: 63 6f 6e 74 61 69 6e 65 72 73 20 62 61 73 65 64 containers based
5740: 20 6f 6e 20 41 6c 70 69 6e 65 2c 20 61 6e 64 20 on Alpine, and
5750: 79 6f 75 e2 80 99 72 65 20 62 61 63 6b 20 69 6e you’re back in
5760: 20 74 68 65 20 73 6f 75 70 20 61 67 61 69 6e 2e the soup again.
5770: 20 57 68 69 6c 65 20 5b 69 74 73 20 43 50 55 20 While [its CPU
5780: 73 75 70 70 6f 72 74 20 6c 69 73 74 5d 28 68 74 support list](ht
5790: 74 70 73 3a 2f 2f 77 69 6b 69 2e 61 6c 70 69 6e tps://wiki.alpin
57a0: 65 6c 69 6e 75 78 2e 6f 72 67 2f 77 69 6b 69 2f elinux.org/wiki/
57b0: 52 65 71 75 69 72 65 6d 65 6e 74 73 29 20 69 73 Requirements) is
57c0: 20 62 72 6f 61 64 65 72 20 74 68 61 6e 20 5b 74 broader than [t
57d0: 68 65 20 6f 6e 65 20 66 6f 72 20 55 62 75 6e 74 he one for Ubunt
57e0: 75 5d 28 68 74 74 70 73 3a 2f 2f 75 62 75 6e 74 u](https://ubunt
57f0: 75 2e 63 6f 6d 2f 63 70 75 2d 63 6f 6d 70 61 74 u.com/cpu-compat
5800: 69 62 69 6c 69 74 79 29 2c 20 74 68 65 72 65 20 ibility), there
5810: 69 73 20 6e 6f 20 54 49 4c 45 20 6f 72 20 4d 49 is no TILE or MI
5820: 50 53 20 61 74 20 61 6c 6c 2c 20 61 6e 64 20 69 PS at all, and i
5830: 74 73 20 50 50 43 20 73 75 70 70 6f 72 74 20 69 ts PPC support i
5840: 73 20 36 34 2d 62 69 74 20 6f 6e 6c 79 2e 20 41 s 64-bit only. A
5850: 72 65 20 79 6f 75 20 67 6f 69 6e 67 20 74 6f 20 re you going to
5860: 70 6f 72 74 20 74 68 65 20 41 6c 70 69 6e 65 20 port the Alpine
5870: 62 61 73 65 20 69 6d 61 67 65 20 61 6e 64 20 65 base image and e
5880: 6e 6f 75 67 68 20 6f 66 20 69 74 73 20 70 61 63 nough of its pac
5890: 6b 61 67 65 20 72 65 70 6f 73 69 74 6f 72 79 20 kage repository
58a0: 74 6f 20 67 65 74 20 79 6f 75 72 20 63 6f 6e 74 to get your cont
58b0: 61 69 6e 65 72 20 62 75 69 6c 64 69 6e 67 3f 0d ainer building?.
58c0: 0a 0d 0a 54 68 65 6e 20 74 68 65 72 65 e2 80 99 ...Then there’
58d0: 73 20 44 65 62 69 61 6e 2c 20 61 6e 6f 74 68 65 s Debian, anothe
58e0: 72 20 70 6f 70 75 6c 61 72 20 4f 43 49 20 69 6d r popular OCI im
58f0: 61 67 65 20 62 61 73 65 2c 20 6f 6e 65 20 74 68 age base, one th
5900: 61 74 e2 80 99 73 20 62 65 65 6e 20 70 6f 72 74 at’s been port
5910: 65 64 20 74 6f 20 61 20 6c 6f 74 20 6f 66 20 73 ed to a lot of s
5920: 74 72 61 6e 67 65 20 70 6c 61 74 66 6f 72 6d 73 trange platforms
5930: 2c 20 62 75 74 20 63 68 61 6e 63 65 73 20 61 72 , but chances ar
5940: 65 20 74 68 61 74 20 69 74 20 77 61 73 20 73 6f e that it was so
5950: 6d 65 6f 6e 65 e2 80 99 73 20 77 69 6c 64 20 70 meone’s wild p
5960: 72 6f 6a 65 63 74 2c 20 6e 6f 77 20 61 62 61 6e roject, now aban
5970: 64 6f 6e 65 64 2e 20 49 74 e2 80 99 73 20 6c 69 doned. It’s li
5980: 6b 65 6c 79 20 74 68 65 20 41 50 54 20 70 61 63 kely the APT pac
5990: 6b 61 67 65 20 72 65 70 6f 20 69 73 6e e2 80 99 kage repo isn’
59a0: 74 20 77 6f 72 6b 69 6e 67 20 61 6e 79 20 6d 6f t working any mo
59b0: 72 65 2c 20 66 6f 72 20 6f 6e 65 2c 20 62 65 63 re, for one, bec
59c0: 61 75 73 65 20 77 68 6f 20 77 61 6e 74 73 20 74 ause who wants t
59d0: 6f 20 68 6f 73 74 20 61 20 68 75 67 65 20 73 65 o host a huge se
59e0: 74 20 6f 66 20 70 61 63 6b 61 67 65 73 20 66 6f t of packages fo
59f0: 72 20 61 20 64 65 61 64 20 70 72 6f 6a 65 63 74 r a dead project
5a00: 3f 0d 0a 0d 0a 49 6e 20 62 72 69 65 66 2c 20 74 ?....In brief, t
5a10: 68 65 20 72 65 61 73 6f 6e 20 4d 69 6b 72 6f 54 he reason MikroT
5a20: 69 6b 20 64 6f 65 73 6e e2 80 99 74 20 73 68 69 ik doesn’t shi
5a30: 70 20 60 63 6f 6e 74 61 69 6e 65 72 2e 6e 70 6b p `container.npk
5a40: 60 20 66 6f 72 20 33 32 2d 62 69 74 20 50 50 43 ` for 32-bit PPC
5a50: 2c 20 33 32 2d 62 69 74 20 4d 49 50 53 2c 20 61 , 32-bit MIPS, a
5a60: 6e 64 20 54 49 4c 45 20 69 73 20 74 68 61 74 20 nd TILE is that
5a70: 74 68 65 72 65 20 61 72 65 20 66 65 77 20 4c 69 there are few Li
5a80: 6e 75 78 20 64 69 73 74 72 6f 20 69 6d 61 67 65 nux distro image
5a90: 73 20 69 6e 20 4f 43 49 20 66 6f 72 6d 61 74 20 s in OCI format
5aa0: 74 6f 20 75 73 65 20 61 73 20 62 61 73 65 20 69 to use as base i
5ab0: 6d 61 67 65 73 2c 20 61 6e 64 20 69 74 20 69 73 mages, and it is
5ac0: 6e e2 80 99 74 20 67 72 65 61 74 6c 79 20 69 6e n’t greatly in
5ad0: 20 74 68 65 69 72 20 69 6e 74 65 72 65 73 74 20 their interest
5ae0: 74 6f 20 70 75 6c 6c 20 74 68 61 74 20 74 6f 67 to pull that tog
5af0: 65 74 68 65 72 20 61 6c 6f 6e 67 20 77 69 74 68 ether along with
5b00: 20 74 68 65 20 51 45 4d 55 20 61 6e 64 20 60 62 the QEMU and `b
5b10: 69 6e 66 6d 74 5f 6d 69 73 63 60 20 70 69 65 63 infmt_misc` piec
5b20: 65 73 20 66 6f 72 20 79 6f 75 2c 20 6e 6f 72 20 es for you, nor
5b30: 69 73 20 69 74 20 69 6e 20 74 68 65 20 66 69 6e is it in the fin
5b40: 61 6e 63 69 61 6c 20 69 6e 74 65 72 65 73 74 20 ancial interest
5b50: 6f 66 20 44 6f 63 6b 65 72 2c 20 50 6f 64 6d 61 of Docker, Podma
5b60: 6e 2c 20 65 74 63 2e 0d 0a 0d 0a 54 68 65 72 65 n, etc.....There
5b70: e2 80 99 73 20 6e 6f 74 68 69 6e 67 20 73 74 6f ’s nothing sto
5b80: 70 70 69 6e 67 20 61 6e 79 6f 6e 65 20 72 65 61 pping anyone rea
5b90: 64 69 6e 67 20 74 68 69 73 20 74 68 61 74 20 68 ding this that h
5ba0: 61 73 20 74 68 65 20 73 6b 69 6c 6c 20 61 6e 64 as the skill and
5bb0: 20 6d 6f 74 69 76 61 74 69 6f 6e 20 74 6f 20 64 motivation to d
5bc0: 6f 20 74 68 69 73 20 66 72 6f 6d 20 64 6f 69 6e o this from doin
5bd0: 67 20 73 6f 2c 20 62 75 74 20 79 6f 75 e2 80 99 g so, but you’
5be0: 6c 6c 20 68 61 76 65 20 74 6f 20 70 72 6f 76 65 ll have to prove
5bf0: 20 6f 75 74 20 79 6f 75 72 20 63 6f 6e 74 61 69 out your contai
5c00: 6e 65 72 73 20 75 6e 64 65 72 20 65 6d 75 6c 61 ners under emula
5c10: 74 69 6f 6e 2e 20 4e 6f 74 20 75 6e 74 69 6c 20 tion. Not until
5c20: 74 68 65 6e 20 64 6f 20 49 20 73 65 65 20 4d 69 then do I see Mi
5c30: 6b 72 6f 54 69 6b 20 62 65 69 6e 67 20 66 6f 72 kroTik being for
5c40: 63 65 64 20 74 6f 20 74 61 6b 65 20 6e 6f 74 69 ced to take noti
5c50: 63 65 20 61 6e 64 20 70 72 6f 76 69 64 65 20 61 ce and provide a
5c60: 20 62 75 69 6c 64 20 6f 66 20 60 63 6f 6e 74 61 build of `conta
5c70: 69 6e 65 72 2e 6e 70 6b 60 20 66 6f 72 20 74 68 iner.npk` for th
5c80: 61 74 20 70 6c 61 74 66 6f 72 6d 2e 20 49 74 e2 at platform. It
5c90: 80 99 73 20 6e 6f 74 20 71 75 69 74 65 20 61 20 s not quite a
5ca0: 63 6c 61 73 73 69 63 20 63 68 69 63 6b 65 6e 2d classic chicken-
5cb0: 61 6e 64 2d 65 67 67 20 73 69 74 75 61 74 69 6f and-egg situatio
5cc0: 6e 2c 20 62 75 74 20 49 20 63 61 6e e2 80 99 74 n, but I can’t
5cd0: 20 69 67 6e 6f 72 65 20 74 68 65 20 68 69 73 73 ignore the hiss
5ce0: 20 6f 66 20 72 61 64 69 6f 20 73 69 6c 65 6e 63 of radio silenc
5cf0: 65 20 49 20 67 6f 74 20 69 6e 20 72 65 73 70 6f e I got in respo
5d00: 6e 73 65 20 74 6f 20 5b 74 68 69 73 20 63 68 61 nse to [this cha
5d10: 6c 6c 65 6e 67 65 5d 28 68 74 74 70 73 3a 2f 2f llenge](https://
5d20: 66 6f 72 75 6d 2e 6d 69 6b 72 6f 74 69 6b 2e 63 forum.mikrotik.c
5d30: 6f 6d 2f 76 69 65 77 74 6f 70 69 63 2e 70 68 70 om/viewtopic.php
5d40: 3f 74 3d 32 30 34 38 36 38 23 70 31 30 35 38 33 ?t=204868#p10583
5d50: 35 31 29 20 6f 6e 20 74 68 65 20 66 6f 72 75 6d 51) on the forum
5d60: 2e 0d 0a 0d 0a 55 6e 74 69 6c 20 73 6f 6d 65 6f .....Until someo
5d70: 6e 65 20 62 72 65 61 6b 73 20 74 68 69 73 20 6c ne breaks this l
5d80: 6f 67 6a 61 6d 2c 20 69 74 e2 80 99 73 20 66 61 ogjam, it’s fa
5d90: 69 72 20 65 6e 6f 75 67 68 20 74 6f 20 73 61 79 ir enough to say
5da0: 20 74 68 61 74 20 52 6f 75 74 65 72 4f 53 e2 80 that RouterOS
5db0: 99 73 20 63 6f 6e 74 61 69 6e 65 72 20 72 75 6e s container run
5dc0: 6e 65 72 20 6f 6e 6c 79 20 73 75 70 70 6f 72 74 ner only support
5dd0: 73 20 41 52 4d 20 61 6e 64 20 49 6e 74 65 6c 20 s ARM and Intel
5de0: 43 50 55 73 2e 0d 0a 0d 0a 0d 0a 23 20 3c 61 20 CPUs.......# <a
5df0: 69 64 3d 22 74 6c 63 22 3e 3c 2f 61 3e 54 6f 70 id="tlc"></a>Top
5e00: 2d 4c 65 76 65 6c 20 43 6f 6d 6d 61 6e 64 73 0d -Level Commands.
5e10: 0a 0d 0a 53 6f 20 65 6e 64 73 20 6d 79 20 63 6f ...So ends my co
5e20: 76 65 72 61 67 65 20 6f 66 20 74 68 65 20 68 65 verage of the he
5e30: 61 76 79 20 70 6f 69 6e 74 73 2e 20 45 76 65 72 avy points. Ever
5e40: 79 74 68 69 6e 67 20 65 6c 73 65 20 77 65 20 63 ything else we c
5e50: 61 6e 20 74 6f 75 63 68 20 6f 6e 20 62 72 69 65 an touch on brie
5e60: 66 6c 79 2c 20 6f 66 74 65 6e 20 62 79 20 72 65 fly, often by re
5e70: 66 65 72 65 6e 63 65 20 74 6f 20 6d 61 74 74 65 ference to matte
5e80: 72 73 20 63 6f 76 65 72 65 64 20 70 72 65 76 69 rs covered previ
5e90: 6f 75 73 6c 79 2e 0d 0a 0d 0a 46 6f 72 20 6c 61 ously.....For la
5ea0: 63 6b 20 6f 66 20 61 6e 79 20 62 65 74 74 65 72 ck of any better
5eb0: 20 6f 72 67 61 6e 69 7a 61 74 69 6f 6e 20 70 72 organization pr
5ec0: 69 6e 63 69 70 6c 65 2c 20 49 e2 80 99 76 65 20 inciple, I’ve
5ed0: 63 68 6f 73 65 6e 20 74 6f 20 63 6f 76 65 72 20 chosen to cover
5ee0: 74 68 65 20 72 65 6d 61 69 6e 69 6e 67 20 60 64 the remaining `d
5ef0: 6f 63 6b 65 72 60 20 43 4c 49 20 63 6f 6d 6d 61 ocker` CLI comma
5f00: 6e 64 73 20 69 6e 20 61 6c 70 68 61 62 65 74 69 nds in alphabeti
5f10: 63 61 6c 20 6f 72 64 65 72 2e 20 42 65 63 61 75 cal order. Becau
5f20: 73 65 20 50 6f 64 6d 61 6e 20 63 6c 6f 6e 65 64 se Podman cloned
5f30: 20 74 68 65 20 44 6f 63 6b 65 72 20 43 4c 49 2c the Docker CLI,
5f40: 20 74 68 69 73 20 6f 72 64 65 72 69 6e 67 20 6d this ordering m
5f50: 61 74 63 68 65 73 20 75 70 20 66 61 69 72 6c 79 atches up fairly
5f60: 20 77 65 6c 6c 20 77 69 74 68 20 69 74 73 20 74 well with its t
5f70: 6f 70 2d 6c 65 76 65 6c 20 63 6f 6d 6d 61 6e 64 op-level command
5f80: 20 73 74 72 75 63 74 75 72 65 20 61 73 20 77 65 structure as we
5f90: 6c 6c 2c 20 74 68 65 20 70 72 69 6d 61 72 79 20 ll, the primary
5fa0: 65 78 63 65 70 74 69 6f 6e 20 62 65 69 6e 67 20 exception being
5fb0: 74 68 61 74 20 49 20 64 6f 20 6e 6f 74 20 63 75 that I do not cu
5fc0: 72 72 65 6e 74 6c 79 20 67 6f 20 69 6e 74 6f 20 rrently go into
5fd0: 61 6e 79 20 6f 66 20 50 6f 64 6d 61 6e e2 80 99 any of Podman’
5fe0: 73 20 70 75 72 65 20 65 78 74 65 6e 73 69 6f 6e s pure extension
5ff0: 73 2c 20 6f 6e 65 73 20 73 75 63 68 20 61 73 20 s, ones such as
6000: 69 74 73 20 65 70 6f 6e 79 6d 6f 75 73 20 60 70 its eponymous `p
6010: 6f 64 60 20 63 6f 6d 6d 61 6e 64 2e 0d 0a 0d 0a od` command.....
6020: 0d 0a 23 23 20 3c 61 20 69 64 3d 22 62 75 69 6c ..## <a id="buil
6030: 64 22 3e 3c 2f 61 3e 60 62 75 69 6c 64 60 2f 60 d"></a>`build`/`
6040: 62 75 69 6c 64 78 60 0d 0a 0d 0a 52 6f 75 74 65 buildx`....Route
6050: 72 4f 53 20 70 72 6f 76 69 64 65 73 20 61 20 62 rOS provides a b
6060: 61 72 65 2d 62 6f 6e 65 73 20 63 6f 6e 74 61 69 are-bones contai
6070: 6e 65 72 20 72 75 6e 74 69 6d 65 20 6f 6e 6c 79 ner runtime only
6080: 2c 20 6e 6f 74 20 61 6e 79 20 6f 66 20 74 68 65 , not any of the
6090: 20 69 6d 61 67 65 20 62 75 69 6c 64 69 6e 67 20 image building
60a0: 74 6f 6f 6c 63 68 61 69 6e 2e 0d 0a 0d 0a 0d 0a toolchain.......
60b0: 23 23 20 3c 61 20 69 64 3d 22 63 6f 6d 6d 69 74 ## <a id="commit
60c0: 22 3e 3c 2f 61 3e 60 63 6f 6d 6d 69 74 60 0d 0a "></a>`commit`..
60d0: 0d 0a 47 69 76 65 6e 20 74 68 65 20 5b 67 6c 6f ..Given the [glo
60e0: 62 61 6c 20 6c 69 6d 69 74 61 74 69 6f 6e 73 5d bal limitations]
60f0: 28 23 67 6c 6f 62 61 6c 29 2c 20 69 74 20 73 68 (#global), it sh
6100: 6f 75 6c 64 20 62 65 20 6e 6f 20 73 75 72 70 72 ould be no surpr
6110: 69 73 65 20 74 68 61 74 20 52 6f 75 74 65 72 4f ise that RouterO
6120: 53 20 68 61 73 20 6e 6f 20 77 61 79 20 74 6f 20 S has no way to
6130: 63 6f 6d 6d 69 74 20 63 68 61 6e 67 65 73 20 6d commit changes m
6140: 61 64 65 20 74 6f 20 74 68 65 20 63 75 72 72 65 ade to the curre
6150: 6e 74 20 69 6d 61 67 65 20 6c 61 79 65 72 20 74 nt image layer t
6160: 6f 20 61 20 6e 65 77 20 6c 61 79 65 72 2e 0d 0a o a new layer...
6170: 0d 0a 0d 0a 23 23 20 3c 61 20 69 64 3d 22 63 6f ....## <a id="co
6180: 6d 70 6f 73 65 22 3e 3c 2f 61 3e 60 63 6f 6d 70 mpose"></a>`comp
6190: 6f 73 65 60 0d 0a 0d 0a 52 6f 75 74 65 72 4f 53 ose`....RouterOS
61a0: 20 63 6f 6d 70 6c 65 74 65 6c 79 20 6c 61 63 6b completely lack
61b0: 73 20 6d 75 6c 74 69 2d 63 6f 6e 74 61 69 6e 65 s multi-containe
61c0: 72 20 6f 72 63 68 65 73 74 72 61 74 69 6f 6e 20 r orchestration
61d0: 66 65 61 74 75 72 65 73 2c 20 69 6e 63 6c 75 64 features, includ
61e0: 69 6e 67 20 6c 69 67 68 74 77 65 69 67 68 74 20 ing lightweight
61f0: 73 69 6e 67 6c 65 2d 62 6f 78 20 6f 6e 65 73 20 single-box ones
6200: 6c 69 6b 65 20 5b 43 6f 6d 70 6f 73 65 5d 28 68 like [Compose](h
6210: 74 74 70 73 3a 2f 2f 64 6f 63 73 2e 64 6f 63 6b ttps://docs.dock
6220: 65 72 2e 63 6f 6d 2f 63 6f 6d 70 6f 73 65 2f 29 er.com/compose/)
6230: 20 6f 72 20 5b 4b 69 6e 64 5d 28 68 74 74 70 73 or [Kind](https
6240: 3a 2f 2f 6b 69 6e 64 2e 73 69 67 73 2e 6b 38 73 ://kind.sigs.k8s
6250: 2e 69 6f 29 20 76 69 72 74 75 61 6c 20 63 6c 75 .io) virtual clu
6260: 73 74 65 72 73 2e 0d 0a 0d 0a 0d 0a 23 23 20 60 sters.......## `
6270: 63 72 65 61 74 65 60 2f 60 6c 6f 61 64 60 0d 0a create`/`load`..
6280: 0d 0a 5b 43 6f 76 65 72 65 64 20 61 62 6f 76 65 ..[Covered above
6290: 5d 28 23 63 72 65 61 74 65 29 2e 0d 0a 0d 0a 0d ](#create)......
62a0: 0a 23 23 20 3c 61 20 69 64 3d 22 63 70 22 3e 3c .## <a id="cp"><
62b0: 2f 61 3e 60 63 70 60 0d 0a 0d 0a 52 6f 75 74 65 /a>`cp`....Route
62c0: 72 4f 53 20 64 6f 65 73 20 6c 65 74 20 79 6f 75 rOS does let you
62d0: 20 6d 6f 75 6e 74 20 61 20 76 6f 6c 75 6d 65 20 mount a volume
62e0: 69 6e 73 69 64 65 20 61 20 63 6f 6e 74 61 69 6e inside a contain
62f0: 65 72 2c 20 74 68 65 6e 20 75 73 65 20 74 68 65 er, then use the
6300: 20 72 65 67 75 6c 61 72 20 60 2f 66 69 6c 65 60 regular `/file`
6310: 20 66 61 63 69 6c 69 74 79 20 74 6f 20 63 6f 70 facility to cop
6320: 79 20 66 69 6c 65 73 20 69 6e 20 75 6e 64 65 72 y files in under
6330: 20 74 68 61 74 20 76 6f 6c 75 6d 65 e2 80 99 73 that volume’s
6340: 20 6d 6f 75 6e 74 20 70 6f 69 6e 74 2c 20 62 75 mount point, bu
6350: 74 20 74 68 69 73 20 69 73 20 6e 6f 74 20 61 74 t this is not at
6360: 20 61 6c 6c 20 74 68 65 20 73 61 6d 65 20 74 68 all the same th
6370: 69 6e 67 20 61 73 20 74 68 65 20 e2 80 9c 60 64 ing as the “`d
6380: 6f 63 6b 65 72 20 63 70 60 e2 80 9d 20 63 6f 6d ocker cp`” com
6390: 6d 61 6e 64 2e 20 54 68 65 72 65 20 69 73 20 6e mand. There is n
63a0: 6f 20 77 61 79 20 74 6f 20 6f 76 65 72 77 72 69 o way to overwri
63b0: 74 65 20 69 6e 2d 63 6f 6e 74 61 69 6e 65 72 20 te in-container
63c0: 66 69 6c 65 73 20 77 69 74 68 20 65 78 74 65 72 files with exter
63d0: 6e 61 6c 20 64 61 74 61 20 73 68 6f 72 74 20 6f nal data short o
63e0: 66 20 72 65 62 75 69 6c 64 69 6e 67 20 74 68 65 f rebuilding the
63f0: 20 63 6f 6e 74 61 69 6e 65 72 20 6f 72 20 75 73 container or us
6400: 69 6e 67 20 69 6e 2d 63 6f 6e 74 61 69 6e 65 72 ing in-container
6410: 20 6d 65 63 68 61 6e 69 73 6d 73 20 6c 69 6b 65 mechanisms like
6420: 20 60 2f 62 69 6e 2f 73 68 60 20 74 6f 20 64 6f `/bin/sh` to do
6430: 20 74 68 65 20 63 6f 70 79 69 6e 67 20 66 6f 72 the copying for
6440: 20 79 6f 75 2e 0d 0a 0d 0a 49 66 20 79 6f 75 20 you.....If you
6450: 63 6f 6d 65 20 66 72 6f 6d 20 61 20 44 6f 63 6b come from a Dock
6460: 65 72 20 6f 72 20 50 6f 64 6d 61 6e 20 62 61 63 er or Podman bac
6470: 6b 67 72 6f 75 6e 64 2c 20 74 68 65 69 72 20 6c kground, their l
6480: 6f 63 61 6c 20 6f 76 65 72 6c 61 79 20 69 6d 61 ocal overlay ima
6490: 67 65 20 73 74 6f 72 65 73 20 6d 69 67 68 74 20 ge stores might
64a0: 6c 65 61 64 20 79 6f 75 20 69 6e 74 6f 20 74 68 lead you into th
64b0: 69 6e 6b 69 6e 67 20 79 6f 75 20 63 6f 75 6c 64 inking you could
64c0: 20 64 72 69 6c 6c 20 64 6f 77 6e 20 69 6e 74 6f drill down into
64d0: 20 74 68 65 20 47 55 49 44 2d 6e 61 6d 65 64 20 the GUID-named
64e0: e2 80 9c 63 6f 6e 74 61 69 6e 65 72 20 73 74 6f “container sto
64f0: 72 65 e2 80 9d 20 64 69 72 65 63 74 6f 72 69 65 re” directorie
6500: 73 20 76 69 73 69 62 6c 65 20 75 6e 64 65 72 20 s visible under
6510: 60 2f 66 69 6c 65 60 20 61 6e 64 20 70 65 72 66 `/file` and perf
6520: 6f 72 6d 20 5f 61 64 20 68 6f 63 5f 20 61 64 6d orm _ad hoc_ adm
6530: 69 6e 69 73 74 72 61 74 69 6f 6e 20 6f 70 65 72 inistration oper
6540: 61 74 69 6f 6e 73 20 6c 69 6b 65 20 6f 76 65 72 ations like over
6550: 77 72 69 74 69 6e 67 20 65 78 69 73 74 69 6e 67 writing existing
6560: 20 63 6f 6e 66 69 67 20 66 69 6c 65 73 20 69 6e config files in
6570: 73 69 64 65 20 74 68 65 20 63 6f 6e 74 61 69 6e side the contain
6580: 65 72 2c 20 62 75 74 20 61 6c 61 73 2c 20 69 74 er, but alas, it
6590: 20 64 6f 65 73 20 6e 6f 74 2e 0d 0a 0d 0a 0d 0a does not.......
65a0: 23 23 20 3c 61 20 69 64 3d 22 64 69 66 66 22 3e ## <a id="diff">
65b0: 3c 2f 61 3e 60 64 69 66 66 60 0d 0a 0d 0a 57 69 </a>`diff`....Wi
65c0: 74 68 20 6e 65 69 74 68 65 72 20 61 20 6c 6f 63 th neither a loc
65d0: 61 6c 20 69 6d 61 67 65 20 63 61 63 68 65 20 6e al image cache n
65e0: 6f 72 20 61 20 43 6f 57 20 66 69 6c 65 20 73 79 or a CoW file sy
65f0: 73 74 65 6d 20 74 6f 20 70 72 6f 76 69 64 65 20 stem to provide
6600: 74 68 65 20 62 61 73 65 6c 69 6e 65 2c 20 74 68 the baseline, th
6610: 65 72 65 20 63 61 6e 20 62 65 20 6e 6f 20 65 71 ere can be no eq
6620: 75 69 76 61 6c 65 6e 74 20 63 6f 6d 6d 61 6e 64 uivalent command
6630: 2e 0d 0a 0d 0a 0d 0a 23 23 20 3c 61 20 69 64 3d .......## <a id=
6640: 22 65 76 65 6e 74 73 22 3e 3c 2f 61 3e 60 65 76 "events"></a>`ev
6650: 65 6e 74 73 60 0d 0a 0d 0a 52 6f 75 74 65 72 4f ents`....RouterO
6660: 53 20 64 6f 65 73 6e e2 80 99 74 20 73 75 70 70 S doesn’t supp
6670: 6f 72 74 20 63 6f 6e 74 61 69 6e 65 72 20 65 76 ort container ev
6680: 65 6e 74 73 2e 0d 0a 0d 0a 0d 0a 23 23 20 3c 61 ents.......## <a
6690: 20 69 64 3d 22 65 78 65 63 22 3e 3c 2f 61 3e 60 id="exec"></a>`
66a0: 65 78 65 63 60 0d 0a 0d 0a 54 68 65 72 65 20 69 exec`....There i
66b0: 73 20 6e 6f 20 77 61 79 20 69 6e 20 52 6f 75 74 s no way in Rout
66c0: 65 72 4f 53 20 74 6f 20 65 78 65 63 75 74 65 20 erOS to execute
66d0: 61 20 63 6f 6d 6d 61 6e 64 20 69 6e 73 69 64 65 a command inside
66e0: 20 61 20 72 75 6e 6e 69 6e 67 20 63 6f 6e 74 61 a running conta
66f0: 69 6e 65 72 20 73 68 6f 72 74 20 6f 66 20 60 2f iner short of `/
6700: 63 6f 6e 74 61 69 6e 65 72 2f 73 68 65 6c 6c 60 container/shell`
6710: 2c 20 77 68 69 63 68 20 6f 66 20 63 6f 75 72 73 , which of cours
6720: 65 20 6f 6e 6c 79 20 77 6f 72 6b 73 20 69 66 20 e only works if
6730: 74 68 65 72 65 20 69 73 20 61 20 60 2f 62 69 6e there is a `/bin
6740: 2f 73 68 60 20 69 6e 73 69 64 65 20 74 68 65 20 /sh` inside the
6750: 63 6f 6e 74 61 69 6e 65 72 2e 0d 0a 0d 0a 0d 0a container.......
6760: 23 23 20 3c 61 20 69 64 3d 22 65 78 70 6f 72 74 ## <a id="export
6770: 22 3e 3c 2f 61 3e 60 65 78 70 6f 72 74 60 2f 60 "></a>`export`/`
6780: 73 61 76 65 60 0d 0a 0d 0a 54 68 65 72 65 20 69 save`....There i
6790: 73 20 6e 6f 20 77 61 79 20 74 6f 20 70 72 6f 64 s no way to prod
67a0: 75 63 65 20 61 20 74 61 72 62 61 6c 6c 20 6f 66 uce a tarball of
67b0: 20 61 20 72 75 6e 6e 69 6e 67 20 63 6f 6e 74 61 a running conta
67c0: 69 6e 65 72 e2 80 99 73 20 66 69 6c 65 73 79 73 iner’s filesys
67d0: 74 65 6d 20 6f 72 20 74 6f 20 73 61 76 65 20 69 tem or to save i
67e0: 74 73 20 73 74 61 74 65 20 62 61 63 6b 20 74 6f ts state back to
67f0: 20 61 6e 20 5b 4f 43 49 5d 20 69 6d 61 67 65 20 an [OCI] image
6800: 74 61 72 62 61 6c 6c 2e 0d 0a 0d 0a 54 68 65 20 tarball.....The
6810: 5b 64 6f 63 75 6d 65 6e 74 65 64 20 61 64 76 69 [documented advi
6820: 63 65 5d 5b 69 6d 67 74 62 5d 20 66 6f 72 20 67 ce][imgtb] for g
6830: 65 74 74 69 6e 67 20 73 75 63 68 20 61 20 74 61 etting such a ta
6840: 72 62 61 6c 6c 20 69 73 20 74 6f 20 64 6f 20 74 rball is to do t
6850: 68 69 73 20 6f 6e 20 74 68 65 20 50 43 20 73 69 his on the PC si
6860: 64 65 20 76 69 61 20 60 64 6f 63 6b 65 72 60 20 de via `docker`
6870: 63 6f 6d 6d 61 6e 64 73 2c 20 74 68 65 6e 20 75 commands, then u
6880: 70 6c 6f 61 64 20 74 68 65 20 74 61 72 62 61 6c pload the tarbal
6890: 6c 20 66 72 6f 6d 20 74 68 65 20 50 43 20 74 6f l from the PC to
68a0: 20 74 68 65 20 52 6f 75 74 65 72 4f 53 20 64 65 the RouterOS de
68b0: 76 69 63 65 2e 0d 0a 0d 0a 5b 69 6d 67 74 62 5d vice.....[imgtb]
68c0: 3a 20 68 74 74 70 73 3a 2f 2f 68 65 6c 70 2e 6d : https://help.m
68d0: 69 6b 72 6f 74 69 6b 2e 63 6f 6d 2f 64 6f 63 73 ikrotik.com/docs
68e0: 2f 64 69 73 70 6c 61 79 2f 52 4f 53 2f 43 6f 6e /display/ROS/Con
68f0: 74 61 69 6e 65 72 23 43 6f 6e 74 61 69 6e 65 72 tainer#Container
6900: 2d 63 29 62 75 69 6c 64 61 6e 69 6d 61 67 65 6f -c)buildanimageo
6910: 6e 50 43 0d 0a 0d 0a 0d 0a 23 23 20 3c 61 20 69 nPC......## <a i
6920: 64 3d 22 68 69 73 74 6f 72 79 22 3e 3c 2f 61 3e d="history"></a>
6930: 60 68 69 73 74 6f 72 79 60 0d 0a 0d 0a 52 6f 75 `history`....Rou
6940: 74 65 72 4f 53 20 64 6f 65 73 6e e2 80 99 74 20 terOS doesn’t
6950: 6b 65 65 70 20 74 68 69 73 20 69 6e 66 6f 72 6d keep this inform
6960: 61 74 69 6f 6e 2e 0d 0a 0d 0a 0d 0a 23 23 20 3c ation.......## <
6970: 61 20 69 64 3d 22 69 6d 61 67 65 22 3e 3c 2f 61 a id="image"></a
6980: 3e 60 69 6d 61 67 65 60 2f 60 69 6d 61 67 65 73 >`image`/`images
6990: 60 0d 0a 0d 0a 54 68 65 20 6c 61 63 6b 20 6f 66 `....The lack of
69a0: 20 61 20 62 75 69 6c 64 20 74 6f 6f 6c 63 68 61 a build toolcha
69b0: 69 6e 20 6d 65 61 6e 73 20 74 68 65 72 65 20 69 in means there i
69c0: 73 20 6e 6f 20 73 65 6e 73 69 62 6c 65 20 65 71 s no sensible eq
69d0: 75 69 76 61 6c 65 6e 74 20 66 6f 72 20 74 68 65 uivalent for the
69e0: 20 e2 80 9c 60 64 6f 63 6b 65 72 20 69 6d 61 67 “`docker imag
69f0: 65 20 62 75 69 6c 64 60 e2 80 9d 20 73 75 62 63 e build`” subc
6a00: 6f 6d 6d 61 6e 64 2e 0d 0a 0d 0a 54 68 65 20 72 ommand.....The r
6a10: 65 73 74 20 6f 66 20 74 68 65 20 6d 69 73 73 69 est of the missi
6a20: 6e 67 20 73 75 62 63 6f 6d 6d 61 6e 64 73 20 61 ng subcommands a
6a30: 72 65 20 65 78 70 6c 61 69 6e 65 64 20 62 79 20 re explained by
6a40: 74 68 65 20 6c 61 63 6b 20 6f 66 20 61 20 6c 6f the lack of a lo
6a50: 63 61 6c 20 69 6d 61 67 65 20 63 61 63 68 65 3a cal image cache:
6a60: 0d 0a 0d 0a 2a 20 20 20 60 68 69 73 74 6f 72 79 ....* `history
6a70: 60 0d 0a 2a 20 20 20 60 69 6d 70 6f 72 74 60 2f `..* `import`/
6a80: 60 6c 6f 61 64 60 2f 60 73 61 76 65 60 0d 0a 2a `load`/`save`..*
6a90: 20 20 20 60 6c 73 60 0d 0a 2a 20 20 20 60 70 72 `ls`..* `pr
6aa0: 75 6e 65 60 0d 0a 2a 20 20 20 60 72 6d 60 2f 60 une`..* `rm`/`
6ab0: 72 6d 69 60 0d 0a 2a 20 20 20 60 74 61 67 60 0d rmi`..* `tag`.
6ac0: 0a 2a 20 20 20 60 74 72 65 65 60 0d 0a 0d 0a 54 .* `tree`....T
6ad0: 68 65 20 66 65 77 20 72 65 6d 61 69 6e 69 6e 67 he few remaining
6ae0: 20 73 75 62 63 6f 6d 6d 61 6e 64 73 20 61 72 65 subcommands are
6af0: 20 69 6d 70 6c 69 63 69 74 6c 79 20 63 6f 76 65 implicitly cove
6b00: 72 65 64 20 65 6c 73 65 77 68 65 72 65 3a 20 5b red elsewhere: [
6b10: 60 69 6e 73 70 65 63 74 60 5d 28 23 69 6e 73 70 `inspect`](#insp
6b20: 65 63 74 29 20 61 6e 64 20 5b 60 70 75 73 68 2f ect) and [`push/
6b30: 70 75 6c 6c 60 5d 28 23 70 75 73 68 29 2e 0d 0a pull`](#push)...
6b40: 0d 0a 0d 0a 23 23 20 3c 61 20 69 64 3d 22 69 6d ....## <a id="im
6b50: 70 6f 72 74 22 3e 3c 2f 61 3e 60 69 6d 70 6f 72 port"></a>`impor
6b60: 74 60 0d 0a 0d 0a 54 68 69 73 20 69 73 20 60 2f t`....This is `/
6b70: 63 6f 6e 74 61 69 6e 65 72 2f 61 64 64 20 66 69 container/add fi
6b80: 6c 65 3d 6f 63 69 2d 69 6d 61 67 65 2e 74 61 72 le=oci-image.tar
6b90: 60 20 69 6e 20 52 6f 75 74 65 72 4f 53 2e 0d 0a ` in RouterOS...
6ba0: 0d 0a 0d 0a 23 23 20 3c 61 20 69 64 3d 22 69 6e ....## <a id="in
6bb0: 66 6f 22 3e 3c 2f 61 3e 60 69 6e 66 6f 60 0d 0a fo"></a>`info`..
6bc0: 0d 0a 57 69 74 68 20 74 68 65 20 75 6e 64 65 72 ..With the under
6bd0: 73 74 61 6e 64 69 6e 67 20 74 68 61 74 20 52 6f standing that Ro
6be0: 75 74 65 72 4f 53 20 68 61 73 20 66 61 72 20 66 uterOS has far f
6bf0: 65 77 65 72 20 63 6f 6e 66 69 67 75 72 61 62 6c ewer configurabl
6c00: 65 73 20 74 68 61 6e 20 61 20 62 69 67 2d 62 6f es than a big-bo
6c10: 79 20 63 6f 6e 74 61 69 6e 65 72 20 65 6e 67 69 y container engi
6c20: 6e 65 2c 20 74 68 65 20 63 6c 6f 73 65 73 74 20 ne, the closest
6c30: 63 6f 6d 6d 61 6e 64 20 74 6f 20 74 68 69 73 20 command to this
6c40: 69 6e 20 52 6f 75 74 65 72 4f 53 20 69 73 20 60 in RouterOS is `
6c50: 2f 63 6f 6e 74 61 69 6e 65 72 2f 63 6f 6e 66 69 /container/confi
6c60: 67 2f 70 72 69 6e 74 60 2e 20 54 68 65 20 6f 75 g/print`. The ou
6c70: 74 70 75 74 20 69 73 20 69 6e 20 74 79 70 69 63 tput is in typic
6c80: 61 6c 20 52 6f 75 74 65 72 4f 53 20 e2 80 9c 70 al RouterOS “p
6c90: 72 69 6e 74 e2 80 9d 20 66 6f 72 6d 61 74 2c 20 rint” format,
6ca0: 6e 6f 74 20 4a 53 4f 4e 2e 0d 0a 0d 0a 0d 0a 23 not JSON.......#
6cb0: 23 20 3c 61 20 69 64 3d 22 69 6e 73 70 65 63 74 # <a id="inspect
6cc0: 22 3e 3c 2f 61 3e 60 69 6e 73 70 65 63 74 60 0d "></a>`inspect`.
6cd0: 0a 0d 0a 54 68 65 20 63 6c 6f 73 65 73 74 20 61 ...The closest a
6ce0: 70 70 72 6f 78 69 6d 61 74 69 6f 6e 20 74 6f 20 pproximation to
6cf0: 74 68 69 73 20 69 6e 20 52 6f 75 74 65 72 4f 53 this in RouterOS
6d00: 20 69 73 20 0d 0a 0d 0a 20 20 20 20 2f 63 6f 6e is .... /con
6d10: 74 61 69 6e 65 72 2f 70 72 69 6e 74 20 64 65 74 tainer/print det
6d20: 61 69 6c 20 77 68 65 72 65 20 e2 80 a6 0d 0a 0d ail where …...
6d30: 0a 59 6f 75 20 67 65 74 20 6f 6e 6c 79 20 61 20 .You get only a
6d40: 66 65 77 20 6c 69 6e 65 73 20 6f 66 20 69 6e 66 few lines of inf
6d50: 6f 72 6d 61 74 69 6f 6e 20 62 61 63 6b 20 66 72 ormation back fr
6d60: 6f 6d 20 74 68 69 73 2c 20 6d 61 69 6e 6c 79 20 om this, mainly
6d70: 77 68 61 74 20 79 6f 75 20 67 61 76 65 20 69 74 what you gave it
6d80: 20 74 6f 20 63 72 65 61 74 65 20 74 68 65 20 63 to create the c
6d90: 6f 6e 74 61 69 6e 65 72 20 66 72 6f 6d 20 74 68 ontainer from th
6da0: 65 20 69 6d 61 67 65 2e 20 59 6f 75 20 77 69 6c e image. You wil
6db0: 6c 20 6e 6f 74 20 67 65 74 20 74 68 65 20 70 61 l not get the pa
6dc0: 67 65 73 20 6f 66 20 4a 53 4f 4e 20 64 61 74 61 ges of JSON data
6dd0: 20 74 68 65 20 44 6f 63 6b 65 72 20 43 4c 49 20 the Docker CLI
6de0: 67 69 76 65 73 2e 0d 0a 0d 0a 41 20 72 65 6c 61 gives.....A rela
6df0: 74 65 64 20 6c 69 6d 69 74 61 74 69 6f 6e 20 69 ted limitation i
6e00: 73 20 74 68 61 74 20 74 68 65 20 63 6f 6e 66 69 s that the confi
6e10: 67 75 72 61 62 6c 65 20 69 74 65 6d 73 20 61 72 gurable items ar
6e20: 65 20 6f 66 74 65 6e 20 67 6c 6f 62 61 6c 20 69 e often global i
6e30: 6e 20 52 6f 75 74 65 72 4f 53 2c 20 73 65 74 20 n RouterOS, set
6e40: 66 6f 72 20 61 6c 6c 20 63 6f 6e 74 61 69 6e 65 for all containe
6e50: 72 73 20 72 75 6e 6e 69 6e 67 20 6f 6e 20 74 68 rs running on th
6e60: 65 20 62 6f 78 2c 20 6e 6f 74 20 61 76 61 69 6c e box, not avail
6e70: 61 62 6c 65 20 74 6f 20 62 65 20 73 65 74 20 6f able to be set o
6e80: 6e 20 61 20 70 65 72 2d 63 6f 6e 74 61 69 6e 65 n a per-containe
6e90: 72 20 62 61 73 69 73 2e 20 41 20 67 6f 6f 64 20 r basis. A good
6ea0: 65 78 61 6d 70 6c 65 20 6f 66 20 74 68 69 73 20 example of this
6eb0: 69 73 20 74 68 65 20 6d 65 6d 6f 72 79 20 6c 69 is the memory li
6ec0: 6d 69 74 2c 20 73 65 74 20 76 69 61 20 60 2f 63 mit, set via `/c
6ed0: 6f 6e 74 61 69 6e 65 72 2f 63 6f 6e 66 69 67 2f ontainer/config/
6ee0: 73 65 74 20 72 61 6d 2d 68 69 67 68 3d e2 80 a6 set ram-high=…
6ef0: 60 2e 0d 0a 0d 0a 0d 0a 23 23 20 3c 61 20 69 64 `.......## <a id
6f00: 3d 22 6b 69 6c 6c 22 20 6e 61 6d 65 3d 22 73 74 ="kill" name="st
6f10: 6f 70 22 3e 3c 2f 61 3e 60 6b 69 6c 6c 60 2f 60 op"></a>`kill`/`
6f20: 73 74 6f 70 60 0d 0a 0d 0a 52 6f 75 74 65 72 4f stop`....RouterO
6f30: 53 20 64 6f 65 73 6e e2 80 99 74 20 6d 61 6b 65 S doesn’t make
6f40: 20 61 20 64 69 73 74 69 6e 63 74 69 6f 6e 20 62 a distinction b
6f50: 65 74 77 65 65 6e 20 e2 80 9c 6b 69 6c 6c e2 80 etween “kill
6f60: 9d 20 61 6e 64 20 e2 80 9c 73 74 6f 70 e2 80 9d and “stop”
6f70: 2e 20 54 68 65 20 60 2f 63 6f 6e 74 61 69 6e 65 . The `/containe
6f80: 72 2f 73 74 6f 70 60 20 63 6f 6d 6d 61 6e 64 20 r/stop` command
6f90: 62 65 68 61 76 65 73 20 6d 6f 72 65 20 6c 69 6b behaves more lik
6fa0: 65 20 60 64 6f 63 6b 65 72 20 6b 69 6c 6c 60 20 e `docker kill`
6fb0: 6f 72 20 60 64 6f 63 6b 65 72 20 73 74 6f 70 20 or `docker stop
6fc0: 2d 74 30 60 20 69 6e 20 74 68 61 74 20 69 74 20 -t0` in that it
6fd0: 64 6f 65 73 6e e2 80 99 74 20 74 72 79 20 74 6f doesn’t try to
6fe0: 20 62 72 69 6e 67 20 74 68 65 20 63 6f 6e 74 61 bring the conta
6ff0: 69 6e 65 72 20 64 6f 77 6e 20 67 72 61 63 65 66 iner down gracef
7000: 75 6c 6c 79 20 62 65 66 6f 72 65 20 67 69 76 69 ully before givi
7010: 6e 67 20 75 70 20 61 6e 64 20 6b 69 6c 6c 69 6e ng up and killin
7020: 67 20 69 74 2e 0d 0a 0d 0a 0d 0a 23 23 20 3c 61 g it.......## <a
7030: 20 69 64 3d 22 6c 6f 67 69 6e 22 3e 3c 2f 61 3e id="login"></a>
7040: 60 6c 6f 67 69 6e 60 2f 60 6c 6f 67 6f 75 74 60 `login`/`logout`
7050: 0d 0a 0d 0a 52 6f 75 74 65 72 4f 53 20 6f 6e 6c ....RouterOS onl
7060: 79 20 61 6c 6c 6f 77 73 20 79 6f 75 20 74 6f 20 y allows you to
7070: 63 6f 6e 66 69 67 75 72 65 20 61 20 73 69 6e 67 configure a sing
7080: 6c 65 20 69 6d 61 67 65 20 72 65 67 69 73 74 72 le image registr
7090: 79 2c 20 69 6e 63 6c 75 64 69 6e 67 20 74 68 65 y, including the
70a0: 20 6c 6f 67 69 6e 20 70 61 72 61 6d 65 74 65 72 login parameter
70b0: 73 3a 0d 0a 0d 0a 20 20 20 20 2f 63 6f 6e 74 61 s:.... /conta
70c0: 69 6e 65 72 2f 63 6f 6e 66 69 67 2f 73 65 74 20 iner/config/set
70d0: 72 65 67 69 73 74 72 79 2d 75 72 6c 3d e2 80 a6 registry-url=…
70e0: 20 75 73 65 72 6e 61 6d 65 3d e2 80 a6 20 70 61 username=… pa
70f0: 73 73 77 6f 72 64 3d e2 80 a6 0d 0a 0d 0a 54 68 ssword=…....Th
7100: 65 20 6f 6e 6c 79 20 77 61 79 20 74 6f 20 e2 80 e only way to
7110: 9c 6c 6f 67 20 6f 75 74 e2 80 9d 20 69 73 20 74 log out” is t
7120: 6f 20 6f 76 65 72 77 72 69 74 65 20 74 68 65 20 o overwrite the
7130: 75 73 65 72 6e 61 6d 65 20 61 6e 64 20 70 61 73 username and pas
7140: 73 77 6f 72 64 20 76 69 61 3a 0d 0a 0d 0a 20 20 sword via:....
7150: 20 20 2f 63 6f 6e 74 61 69 6e 65 72 2f 63 6f 6e /container/con
7160: 66 69 67 2f 73 65 74 20 75 73 65 72 6e 61 6d 65 fig/set username
7170: 3d 22 22 20 70 61 73 73 77 6f 72 64 3d 22 22 0d ="" password="".
7180: 0a 0d 0a 0d 0a 23 23 20 60 6c 6f 67 73 60 0d 0a .....## `logs`..
7190: 0d 0a 5b 43 6f 76 65 72 65 64 20 61 62 6f 76 65 ..[Covered above
71a0: 5d 28 23 6c 6f 67 73 29 2e 0d 0a 0d 0a 0d 0a 23 ](#logs).......#
71b0: 23 20 3c 61 20 69 64 3d 22 70 61 75 73 65 22 3e # <a id="pause">
71c0: 3c 2f 61 3e 60 70 61 75 73 65 60 2f 60 75 6e 70 </a>`pause`/`unp
71d0: 61 75 73 65 60 0d 0a 0d 0a 4e 6f 20 73 75 63 68 ause`....No such
71e0: 20 66 65 61 74 75 72 65 20 69 6e 20 52 6f 75 74 feature in Rout
71f0: 65 72 4f 53 3b 20 61 20 63 6f 6e 74 61 69 6e 65 erOS; a containe
7200: 72 20 69 73 20 72 75 6e 6e 69 6e 67 20 6f 72 20 r is running or
7210: 6e 6f 74 2e 0d 0a 0d 0a 49 66 20 74 68 65 20 63 not.....If the c
7220: 6f 6e 74 61 69 6e 65 72 20 68 61 73 20 61 20 73 ontainer has a s
7230: 68 65 6c 6c 2c 20 79 6f 75 20 63 6f 75 6c 64 20 hell, you could
7240: 74 72 79 20 61 20 63 6f 6d 6d 61 6e 64 20 73 65 try a command se
7250: 71 75 65 6e 63 65 20 6c 69 6b 65 20 74 68 69 73 quence like this
7260: 20 74 6f 20 67 65 74 20 74 68 65 20 70 61 75 73 to get the paus
7270: 65 20 65 66 66 65 63 74 3a 0d 0a 0d 0a 20 20 20 e effect:....
7280: 20 3e 20 2f 63 6f 6e 74 61 69 6e 65 72 2f 73 68 > /container/sh
7290: 65 6c 6c 20 30 0d 0a 20 20 20 20 24 20 70 6b 69 ell 0.. $ pki
72a0: 6c 6c 20 2d 53 54 4f 50 20 27 6e 61 6d 65 20 6f ll -STOP 'name o
72b0: 66 20 65 6e 74 72 79 70 6f 69 6e 74 27 0d 0a 0d f entrypoint'...
72c0: 0a 49 66 20 74 68 61 74 20 77 6f 72 6b 65 64 2c .If that worked,
72d0: 20 73 65 6e 64 69 6e 67 20 61 20 60 43 4f 4e 54 sending a `CONT
72e0: 60 20 73 69 67 6e 61 6c 20 77 69 6c 6c 20 75 6e ` signal will un
72f0: 70 61 75 73 65 20 74 68 65 20 70 72 6f 63 65 73 pause the proces
7300: 73 2e 0d 0a 0d 0a 0d 0a 23 23 20 3c 61 20 69 64 s.......## <a id
7310: 3d 22 70 6f 72 74 22 3e 3c 2f 61 3e 60 70 6f 72 ="port"></a>`por
7320: 74 60 0d 0a 0d 0a 52 6f 75 74 65 72 4f 53 20 65 t`....RouterOS e
7330: 78 70 6f 73 65 73 20 61 6c 6c 20 70 6f 72 74 73 xposes all ports
7340: 20 64 65 66 69 6e 65 64 20 66 6f 72 20 61 20 63 defined for a c
7350: 6f 6e 74 61 69 6e 65 72 20 69 6e 20 74 68 65 20 ontainer in the
7360: 60 45 58 50 4f 53 45 60 20 64 69 72 65 63 74 69 `EXPOSE` directi
7370: 76 65 20 69 6e 20 74 68 65 20 60 44 6f 63 6b 65 ve in the `Docke
7380: 72 66 69 6c 65 60 2e 20 54 68 65 20 6f 6e 6c 79 rfile`. The only
7390: 20 77 61 79 73 20 74 6f 20 69 6e 73 74 61 6e 74 ways to instant
73a0: 69 61 74 65 20 61 20 63 6f 6e 74 61 69 6e 65 72 iate a container
73b0: 20 77 69 74 68 20 66 65 77 65 72 20 65 78 70 6f with fewer expo
73c0: 73 65 64 20 70 6f 72 74 73 20 61 72 65 20 74 6f sed ports are to
73d0: 20 65 69 74 68 65 72 20 72 65 62 75 69 6c 64 20 either rebuild
73e0: 69 74 20 77 69 74 68 20 61 20 64 69 66 66 65 72 it with a differ
73f0: 65 6e 74 20 60 45 58 50 4f 53 45 60 20 76 61 6c ent `EXPOSE` val
7400: 75 65 20 6f 72 20 74 6f 20 63 72 65 61 74 65 20 ue or to create
7410: 61 20 64 65 72 69 76 65 64 20 63 6f 6e 74 61 69 a derived contai
7420: 6e 65 72 20 77 69 74 68 20 74 68 65 20 60 46 52 ner with the `FR
7430: 4f 4d 60 20 64 69 72 65 63 74 69 76 65 20 61 6e OM` directive an
7440: 64 20 73 65 74 20 61 20 6e 65 77 20 60 45 58 50 d set a new `EXP
7450: 4f 53 45 60 20 76 61 6c 75 65 2e 0d 0a 0d 0a 28 OSE` value.....(
7460: 53 65 65 20 61 6c 73 6f 20 74 68 65 20 64 69 73 See also the dis
7470: 63 75 73 73 69 6f 6e 20 6f 66 20 5b 60 2d 2d 70 cussion of [`--p
7480: 75 62 6c 69 73 68 60 5d 28 23 70 75 62 6c 69 73 ublish`](#publis
7490: 68 29 20 61 62 6f 76 65 2e 29 0d 0a 0d 0a 0d 0a h) above.)......
74a0: 23 23 20 60 72 75 6e 60 0d 0a 0d 0a 5b 43 6f 76 ## `run`....[Cov
74b0: 65 72 65 64 20 61 62 6f 76 65 5d 28 23 72 75 6e ered above](#run
74c0: 29 2e 0d 0a 0d 0a 0d 0a 23 23 20 3c 61 20 69 64 ).......## <a id
74d0: 3d 22 70 73 22 3e 3c 2f 61 3e 60 70 73 60 2f 60 ="ps"></a>`ps`/`
74e0: 73 74 61 74 73 60 2f 60 74 6f 70 60 0d 0a 0d 0a stats`/`top`....
74f0: 54 68 65 20 63 6c 6f 73 65 73 74 20 74 68 69 6e The closest thin
7500: 67 20 69 6e 20 52 6f 75 74 65 72 4f 53 20 69 73 g in RouterOS is
7510: 20 74 68 65 20 60 2f 63 6f 6e 74 61 69 6e 65 72 the `/container
7520: 2f 70 72 69 6e 74 20 66 6f 6c 6c 6f 77 2a 60 20 /print follow*`
7530: 63 6f 6d 6d 61 6e 64 73 2e 0d 0a 0d 0a 41 20 6d commands.....A m
7540: 6f 72 65 20 64 69 72 65 63 74 20 61 6c 74 65 72 ore direct alter
7550: 6e 61 74 69 76 65 20 77 6f 75 6c 64 20 62 65 20 native would be
7560: 74 6f 20 73 68 65 6c 6c 20 69 6e 74 6f 20 74 68 to shell into th
7570: 65 20 63 6f 6e 74 61 69 6e 65 72 20 61 6e 64 20 e container and
7580: 72 75 6e 20 77 68 61 74 65 76 65 72 20 69 74 20 run whatever it
7590: 68 61 73 20 66 6f 72 20 61 20 60 74 6f 70 60 20 has for a `top`
75a0: 63 6f 6d 6d 61 6e 64 2c 20 62 75 74 20 6f 66 20 command, but of
75b0: 63 6f 75 72 73 65 20 74 68 61 74 20 69 73 20 63 course that is c
75c0: 6f 6e 74 69 6e 67 65 6e 74 20 6f 6e 20 61 6e 79 ontingent on any
75d0: 20 6f 66 20 74 68 61 74 20 62 65 69 6e 67 20 61 of that being a
75e0: 76 61 69 6c 61 62 6c 65 2e 0d 0a 0d 0a 0d 0a 23 vailable.......#
75f0: 23 20 3c 61 20 69 64 3d 22 70 75 73 68 22 3e 3c # <a id="push"><
7600: 2f 61 3e 60 70 75 73 68 60 2f 60 70 75 6c 6c 60 /a>`push`/`pull`
7610: 0d 0a 0d 0a 52 6f 75 74 65 72 4f 53 20 6d 61 69 ....RouterOS mai
7620: 6e 74 61 69 6e 73 20 6e 6f 20 6c 6f 63 61 6c 20 ntains no local
7630: 69 6d 61 67 65 20 63 61 63 68 65 2c 20 74 68 75 image cache, thu
7640: 73 20 63 61 6e 6e 6f 74 20 70 75 73 68 20 6f 72 s cannot push or
7650: 20 70 75 6c 6c 20 69 6d 61 67 65 73 2e 0d 0a 0d pull images....
7660: 0a 57 68 69 6c 65 20 69 74 20 5f 63 61 6e 5f 20 .While it _can_
7670: 70 75 6c 6c 20 66 72 6f 6d 20 61 6e 20 5b 4f 43 pull from an [OC
7680: 49 5d 20 69 6d 61 67 65 20 72 65 70 6f 2c 20 69 I] image repo, i
7690: 74 20 64 6f 65 73 20 73 6f 20 61 73 20 70 61 72 t does so as par
76a0: 74 20 6f 66 20 60 2f 63 6f 6e 74 61 69 6e 65 72 t of `/container
76b0: 2f 61 64 64 60 2c 20 77 68 69 63 68 20 69 73 20 /add`, which is
76c0: 63 6c 6f 73 65 72 20 74 6f 20 61 20 60 64 6f 63 closer to a `doc
76d0: 6b 65 72 20 63 72 65 61 74 65 60 20 63 6f 6d 6d ker create` comm
76e0: 61 6e 64 20 74 68 61 6e 20 74 6f 20 60 64 6f 63 and than to `doc
76f0: 6b 65 72 20 70 75 6c 6c 60 2e 0d 0a 0d 0a 54 68 ker pull`.....Th
7700: 65 72 65 20 69 73 20 6e 6f 20 65 71 75 69 76 61 ere is no equiva
7710: 6c 65 6e 74 20 61 74 20 61 6c 6c 20 74 6f 20 60 lent at all to `
7720: 64 6f 63 6b 65 72 20 70 75 73 68 60 2e 0d 0a 0d docker push`....
7730: 0a 0d 0a 23 23 20 3c 61 20 69 64 3d 22 72 65 6e ...## <a id="ren
7740: 61 6d 65 22 3e 3c 2f 61 3e 60 72 65 6e 61 6d 65 ame"></a>`rename
7750: 60 0d 0a 0d 0a 52 6f 75 74 65 72 4f 53 20 64 6f `....RouterOS do
7760: 65 73 6e e2 80 99 74 20 6c 65 74 20 79 6f 75 20 esn’t let you
7770: 73 65 74 20 74 68 65 20 6e 61 6d 65 20 6f 6e 20 set the name on
7780: 63 72 65 61 74 69 6f 6e 2c 20 6d 75 63 68 20 6c creation, much l
7790: 65 73 73 20 72 65 6e 61 6d 65 20 69 74 20 6c 61 ess rename it la
77a0: 74 65 72 2e 20 54 68 65 20 63 6c 6f 73 65 73 74 ter. The closest
77b0: 20 79 6f 75 20 63 61 6e 20 63 6f 6d 65 20 74 6f you can come to
77c0: 20 74 68 69 73 20 69 73 20 74 6f 20 61 64 64 20 this is to add
77d0: 61 20 63 75 73 74 6f 6d 20 60 63 6f 6d 6d 65 6e a custom `commen
77e0: 74 60 2c 20 77 68 69 63 68 20 79 6f 75 20 63 61 t`, which you ca
77f0: 6e 20 62 6f 74 68 20 73 65 74 20 61 74 20 e2 80 n both set at
7800: 9c 60 61 64 64 60 e2 80 9d 20 74 69 6d 65 20 61 `add`” time a
7810: 6e 64 20 61 66 74 65 72 20 63 72 65 61 74 69 6f nd after creatio
7820: 6e 2e 0d 0a 0d 0a 0d 0a 23 23 20 3c 61 20 69 64 n.......## <a id
7830: 3d 22 72 65 73 74 61 72 74 22 3e 3c 2f 61 3e 60 ="restart"></a>`
7840: 72 65 73 74 61 72 74 60 0d 0a 0d 0a 54 68 69 73 restart`....This
7850: 20 73 68 6f 72 74 63 75 74 20 66 6f 72 20 5b 60 shortcut for [`
7860: 73 74 6f 70 60 5d 28 23 73 74 6f 70 29 20 66 6f stop`](#stop) fo
7870: 6c 6c 6f 77 65 64 20 62 79 20 5b 60 73 74 61 72 llowed by [`star
7880: 74 60 5d 28 23 73 74 61 72 74 29 20 64 6f 65 73 t`](#start) does
7890: 6e e2 80 99 74 20 65 78 69 73 74 2e 0d 0a 0d 0a n’t exist.....
78a0: 49 74 20 6f 66 74 65 6e 20 65 6e 64 73 20 75 70 It often ends up
78b0: 20 62 65 69 6e 67 20 6d 6f 72 65 20 63 6f 6d 70 being more comp
78c0: 6c 65 78 20 74 68 61 6e 20 74 68 61 74 20 62 65 lex than that be
78d0: 63 61 75 73 65 20 74 68 65 20 60 73 74 6f 70 60 cause the `stop`
78e0: 20 6f 70 65 72 61 74 69 6f 6e 20 69 73 20 61 73 operation is as
78f0: 79 6e 63 68 72 6f 6e 6f 75 73 2e 20 54 68 65 72 ynchronous. Ther
7900: 65 20 61 72 65 20 6e 6f 20 66 6c 61 67 73 20 74 e are no flags t
7910: 6f 20 6d 61 6b 65 20 69 74 20 62 6c 6f 63 6b 20 o make it block
7920: 75 6e 74 69 6c 20 74 68 65 20 63 6f 6e 74 61 69 until the contai
7930: 6e 65 72 20 64 6f 65 73 20 73 74 6f 70 2c 20 6e ner does stop, n
7940: 6f 72 20 61 20 77 61 79 20 74 6f 20 73 65 74 20 or a way to set
7950: 61 20 74 69 6d 65 6f 75 74 20 6f 6e 20 69 74 2c a timeout on it,
7960: 20 61 66 74 65 72 20 77 68 69 63 68 20 69 74 20 after which it
7970: 6b 69 6c 6c 73 20 74 68 65 20 63 6f 6e 74 61 69 kills the contai
7980: 6e 65 72 20 6f 75 74 72 69 67 68 74 2c 20 61 73 ner outright, as
7990: 20 79 6f 75 20 67 65 74 20 77 69 74 68 20 74 68 you get with th
79a0: 65 20 62 69 67 2d 62 6f 79 20 65 6e 67 69 6e 65 e big-boy engine
79b0: 73 2e 20 59 6f 75 20 61 72 65 20 6c 69 6b 65 6c s. You are likel
79c0: 79 20 74 6f 20 6e 65 65 64 20 61 20 70 6f 6c 6c y to need a poll
79d0: 69 6e 67 20 6c 6f 6f 70 20 74 6f 20 77 61 69 74 ing loop to wait
79e0: 20 75 6e 74 69 6c 20 74 68 65 20 72 75 6e 6e 69 until the runni
79f0: 6e 67 20 63 6f 6e 74 61 69 6e 65 72 e2 80 99 73 ng container’s
7a00: 20 73 74 61 74 65 20 74 72 61 6e 73 69 74 69 6f state transitio
7a10: 6e 73 20 74 6f 20 e2 80 9c 73 74 6f 70 70 65 64 ns to “stopped
7a20: e2 80 9d 20 62 65 66 6f 72 65 20 63 61 6c 6c 69 ” before calli
7a30: 6e 67 20 60 2f 63 6f 6e 74 61 69 6e 65 72 2f 73 ng `/container/s
7a40: 74 61 72 74 60 20 6f 6e 20 69 74 2e 0d 0a 0d 0a tart` on it.....
7a50: 53 65 65 20 61 6c 73 6f 20 5b 60 2d 2d 72 65 73 See also [`--res
7a60: 74 61 72 74 60 5d 28 23 72 65 73 74 61 72 74 29 tart`](#restart)
7a70: 20 61 62 6f 76 65 2e 0d 0a 0d 0a 0d 0a 23 23 20 above.......##
7a80: 3c 61 20 69 64 3d 22 72 6d 22 3e 3c 2f 61 3e 60 <a id="rm"></a>`
7a90: 72 6d 60 0d 0a 0d 0a 52 6f 75 74 65 72 4f 53 20 rm`....RouterOS
7aa0: 73 70 65 6c 6c 73 20 74 68 69 73 20 60 2f 63 6f spells this `/co
7ab0: 6e 74 61 69 6e 65 72 2f 72 65 6d 6f 76 65 60 2c ntainer/remove`,
7ac0: 20 62 75 74 20 64 6f 20 62 65 20 61 77 61 72 65 but do be aware
7ad0: 2c 20 74 68 65 72 65 20 69 73 20 6e 6f 20 65 71 , there is no eq
7ae0: 75 69 76 61 6c 65 6e 74 20 66 6f 72 20 60 64 6f uivalent for `do
7af0: 63 6b 65 72 20 72 6d 20 2d 66 60 20 74 6f 20 66 cker rm -f` to f
7b00: 6f 72 63 65 20 74 68 65 20 72 65 6d 6f 76 61 6c orce the removal
7b10: 20 6f 66 20 61 20 72 75 6e 6e 69 6e 67 20 63 6f of a running co
7b20: 6e 74 61 69 6e 65 72 2e 20 52 6f 75 74 65 72 4f ntainer. RouterO
7b30: 53 20 6d 61 6b 65 73 20 79 6f 75 20 73 74 6f 70 S makes you stop
7b40: 20 69 74 20 66 69 72 73 74 2e 0d 0a 0d 0a 41 6e it first.....An
7b50: 6f 74 68 65 72 20 6b 6e 6f 63 6b 2d 6f 6e 20 65 other knock-on e
7b60: 66 66 65 63 74 20 74 6f 20 62 65 20 61 77 61 72 ffect to be awar
7b70: 65 20 6f 66 20 73 74 65 6d 73 20 66 72 6f 6d 20 e of stems from
7b80: 74 68 65 20 6c 61 63 6b 20 6f 66 20 61 20 6c 6f the lack of a lo
7b90: 63 61 6c 20 69 6d 61 67 65 20 63 61 63 68 65 3a cal image cache:
7ba0: 20 72 65 6d 6f 76 69 6e 67 20 61 20 63 6f 6e 74 removing a cont
7bb0: 61 69 6e 65 72 20 61 6e 64 20 72 65 69 6e 73 74 ainer and reinst
7bc0: 61 6c 6c 69 6e 67 20 69 74 20 66 72 6f 6d 20 74 alling it from t
7bd0: 68 65 20 2a 73 61 6d 65 2a 20 72 65 6d 6f 74 65 he *same* remote
7be0: 20 69 6d 61 67 65 20 72 65 71 75 69 72 65 73 20 image requires
7bf0: 52 6f 75 74 65 72 4f 53 20 74 6f 20 72 65 2d 64 RouterOS to re-d
7c00: 6f 77 6e 6c 6f 61 64 20 74 68 65 20 69 6d 61 67 ownload the imag
7c10: 65 2c 20 65 76 65 6e 20 77 68 65 6e 20 64 6f 6e e, even when don
7c20: 65 20 62 61 63 6b 2d 74 6f 2d 62 61 63 6b 2c 20 e back-to-back,
7c30: 65 76 65 6e 20 69 66 20 79 6f 75 20 6e 65 76 65 even if you neve
7c40: 72 20 73 74 61 72 74 20 74 68 65 20 63 6f 6e 74 r start the cont
7c50: 61 69 6e 65 72 20 62 65 74 77 65 65 6e 20 61 6e ainer between an
7c60: 64 20 74 68 65 72 65 62 79 20 63 61 75 73 65 20 d thereby cause
7c70: 69 74 20 74 6f 20 6d 61 6b 65 20 63 68 61 6e 67 it to make chang
7c80: 65 73 20 74 6f 20 74 68 65 20 65 78 70 61 6e 64 es to the expand
7c90: 65 64 20 69 6d 61 67 65 e2 80 99 73 20 66 69 6c ed image’s fil
7ca0: 65 73 2e 20 59 6f 75 20 63 61 6e 20 65 6e 64 20 es. You can end
7cb0: 75 70 20 68 69 74 74 69 6e 67 20 61 6e 6e 6f 79 up hitting annoy
7cc0: 69 6e 67 20 72 61 74 65 2d 6c 69 6d 69 74 69 6e ing rate-limitin
7cd0: 67 20 6f 6e 20 74 68 65 20 e2 80 9c 66 72 65 65 g on the “free
7ce0: e2 80 9d 20 72 65 67 69 73 74 72 69 65 73 20 69 ” registries i
7cf0: 6e 20 74 68 65 20 6d 69 64 64 6c 65 20 6f 66 20 n the middle of
7d00: 61 20 68 6f 74 2d 61 6e 64 2d 68 65 61 76 79 20 a hot-and-heavy
7d10: 64 65 62 75 67 67 69 6e 67 20 73 65 73 73 69 6f debugging sessio
7d20: 6e 20 64 75 65 20 74 6f 20 74 68 69 73 2e 20 41 n due to this. A
7d30: 73 6b 20 6d 65 20 68 6f 77 20 49 20 6b 6e 6f 77 sk me how I know
7d40: 2e 20 f0 9f 98 81 0d 0a 0d 0a 54 68 65 20 73 6f . 😁....The so
7d50: 6c 75 74 69 6f 6e 20 69 73 20 74 6f 20 70 72 6f lution is to pro
7d60: 64 75 63 65 20 61 6e 20 5b 4f 43 49 5d 20 69 6d duce an [OCI] im
7d70: 61 67 65 20 74 61 72 62 61 6c 6c 20 69 6e 20 74 age tarball in t
7d80: 68 65 20 66 6f 72 6d 61 74 20 73 75 62 73 65 74 he format subset
7d90: 20 74 68 61 74 20 60 2f 63 6f 6e 74 61 69 6e 65 that `/containe
7da0: 72 2f 61 64 64 20 66 69 6c 65 3d e2 80 a6 60 20 r/add file=…`
7db0: 77 69 6c 6c 20 61 63 63 65 70 74 2e 0d 0a 0d 0a will accept.....
7dc0: 42 75 74 20 74 68 61 74 20 62 72 69 6e 67 73 20 But that brings
7dd0: 75 70 20 61 20 6e 65 77 20 6c 69 6d 69 74 61 74 up a new limitat
7de0: 69 6f 6e 20 77 6f 72 74 68 20 6d 65 6e 74 69 6f ion worth mentio
7df0: 6e 69 6e 67 3a 20 60 63 6f 6e 74 61 69 6e 65 72 ning: `container
7e00: 2e 6e 70 6b 60 20 69 73 6e e2 80 99 74 20 31 30 .npk` isn’t 10
7e10: 30 25 20 4f 43 49 2d 63 6f 6d 70 6c 69 61 6e 74 0% OCI-compliant
7e20: 2e 20 49 74 20 63 61 6e e2 80 99 74 20 68 61 6e . It can’t han
7e30: 64 6c 65 20 6d 75 6c 74 69 2d 70 6c 61 74 66 6f dle multi-platfo
7e40: 72 6d 20 69 6d 61 67 65 20 74 61 72 62 61 6c 6c rm image tarball
7e50: 73 2c 20 66 6f 72 20 6f 6e 65 2e 20 59 6f 75 20 s, for one. You
7e60: 68 61 76 65 20 74 6f 20 67 69 76 65 20 74 68 65 have to give the
7e70: 20 6d 61 74 63 68 69 6e 67 20 60 2d 2d 70 6c 61 matching `--pla
7e80: 74 66 6f 72 6d 60 20 6f 70 74 69 6f 6e 20 77 68 tform` option wh
7e90: 65 6e 20 64 6f 77 6e 6c 6f 61 64 69 6e 67 20 74 en downloading t
7ea0: 68 65 20 74 61 72 62 61 6c 6c 20 74 6f 20 67 65 he tarball to ge
7eb0: 74 20 73 6f 6d 65 74 68 69 6e 67 20 60 63 6f 6e t something `con
7ec0: 74 61 69 6e 65 72 2e 6e 70 6b 60 20 77 69 6c 6c tainer.npk` will
7ed0: 20 61 63 63 65 70 74 2e 0d 0a 0d 0a 0d 0a 23 23 accept.......##
7ee0: 20 3c 61 20 69 64 3d 22 73 65 61 72 63 68 22 3e <a id="search">
7ef0: 3c 2f 61 3e 60 73 65 61 72 63 68 60 0d 0a 0d 0a </a>`search`....
7f00: 54 68 65 72 65 20 69 73 20 6e 6f 20 65 71 75 69 There is no equi
7f10: 76 61 6c 65 6e 74 20 74 6f 20 74 68 69 73 20 69 valent to this i
7f20: 6e 20 52 6f 75 74 65 72 4f 53 2e 20 59 6f 75 20 n RouterOS. You
7f30: 77 69 6c 6c 20 6e 65 65 64 20 74 6f 20 63 6f 6e will need to con
7f40: 6e 65 63 74 20 74 6f 20 79 6f 75 72 20 69 6d 61 nect to your ima
7f50: 67 65 20 72 65 67 69 73 74 72 79 20 6f 66 20 63 ge registry of c
7f60: 68 6f 69 63 65 20 61 6e 64 20 75 73 65 20 69 74 hoice and use it
7f70: 73 20 73 65 61 72 63 68 20 65 6e 67 69 6e 65 2e s search engine.
7f80: 0d 0a 0d 0a 0d 0a 23 23 20 3c 61 20 69 64 3d 22 ......## <a id="
7f90: 73 65 63 72 65 74 22 3e 3c 2f 61 3e 60 73 65 63 secret"></a>`sec
7fa0: 72 65 74 60 0d 0a 0d 0a 54 68 69 73 20 74 79 70 ret`....This typ
7fb0: 69 63 61 6c 6c 79 20 73 68 6f 77 73 20 75 70 20 ically shows up
7fc0: 61 73 20 70 61 72 74 20 6f 66 20 44 6f 63 6b 65 as part of Docke
7fd0: 72 20 53 77 61 72 6d 2c 20 4b 75 62 65 72 6e 65 r Swarm, Kuberne
7fe0: 74 65 73 2c 20 6f 72 20 50 6f 64 6d 61 6e 20 70 tes, or Podman p
7ff0: 6f 64 73 2c 20 6e 6f 6e 65 20 6f 66 20 77 68 69 ods, none of whi
8000: 63 68 20 65 78 69 73 74 73 20 75 6e 64 65 72 20 ch exists under
8010: 52 6f 75 74 65 72 4f 53 2c 20 77 68 69 63 68 20 RouterOS, which
8020: 69 73 20 77 68 79 20 69 74 20 73 68 6f 75 6c 64 is why it should
8030: 6e e2 80 99 74 20 73 75 72 70 72 69 73 65 20 79 n’t surprise y
8040: 6f 75 20 74 68 61 74 20 52 6f 75 74 65 72 4f 53 ou that RouterOS
8050: 20 68 61 73 20 6e 6f 20 73 65 63 72 65 74 2d 73 has no secret-s
8060: 68 61 72 69 6e 67 20 66 61 63 69 6c 69 74 79 2e haring facility.
8070: 20 54 68 65 20 73 74 61 6e 64 61 72 64 20 66 61 The standard fa
8080: 6c 6c 62 61 63 6b 73 20 66 6f 72 20 74 68 69 73 llbacks for this
8090: 20 61 72 65 20 70 61 73 73 65 64 2d 69 6e 20 65 are passed-in e
80a0: 6e 76 69 72 6f 6e 6d 65 6e 74 20 76 61 72 69 61 nvironment varia
80b0: 62 6c 65 73 20 6f 72 20 62 69 6e 64 2d 6d 6f 75 bles or bind-mou
80c0: 6e 74 65 64 20 76 6f 6c 75 6d 65 73 2e 0d 0a 0d nted volumes....
80d0: 0a 0d 0a 23 23 20 3c 61 20 69 64 3d 22 73 74 61 ...## <a id="sta
80e0: 72 74 22 3e 3c 2f 61 3e 60 73 74 61 72 74 60 0d rt"></a>`start`.
80f0: 0a 0d 0a 52 6f 75 74 65 72 4f 53 20 68 61 73 20 ...RouterOS has
8100: 60 2f 63 6f 6e 74 61 69 6e 65 72 2f 73 74 61 72 `/container/star
8110: 74 60 2c 20 77 69 74 68 20 6c 69 6d 69 74 61 74 t`, with limitat
8120: 69 6f 6e 73 20 79 6f 75 20 63 61 6e 20 72 65 61 ions you can rea
8130: 73 6f 6e 61 62 6c 79 20 69 6e 66 65 72 20 66 72 sonably infer fr
8140: 6f 6d 20 74 68 65 20 72 65 73 74 20 6f 66 20 74 om the rest of t
8150: 68 69 73 20 61 72 74 69 63 6c 65 2e 0d 0a 0d 0a his article.....
8160: 0d 0a 23 23 20 3c 61 20 69 64 3d 22 73 77 61 72 ..## <a id="swar
8170: 6d 22 3e 3c 2f 61 3e 60 73 77 61 72 6d 60 0d 0a m"></a>`swarm`..
8180: 0d 0a 45 78 74 65 6e 64 69 6e 67 20 66 72 6f 6d ..Extending from
8190: 20 74 68 65 20 5b 6c 61 63 6b 20 6f 66 20 73 69 the [lack of si
81a0: 6e 67 6c 65 2d 62 6f 78 20 63 6f 6e 74 61 69 6e ngle-box contain
81b0: 65 72 20 6f 72 63 68 65 73 74 72 61 74 69 6f 6e er orchestration
81c0: 20 66 65 61 74 75 72 65 73 5d 28 23 63 6f 6d 70 features](#comp
81d0: 6f 73 65 29 2c 20 52 6f 75 74 65 72 4f 53 20 61 ose), RouterOS a
81e0: 6c 73 6f 20 63 6f 6d 70 6c 65 74 65 6c 79 20 6c lso completely l
81f0: 61 63 6b 73 20 61 20 5f 63 6c 75 73 74 65 72 5f acks a _cluster_
8200: 20 6f 72 63 68 65 73 74 72 61 74 69 6f 6e 20 66 orchestration f
8210: 65 61 74 75 72 65 2c 20 6e 6f 74 20 65 76 65 6e eature, not even
8220: 20 61 20 6c 69 67 68 74 77 65 69 67 68 74 20 6f a lightweight o
8230: 6e 65 20 6c 69 6b 65 20 5b 44 6f 63 6b 65 72 20 ne like [Docker
8240: 53 77 61 72 6d 5d 28 68 74 74 70 73 3a 2f 2f 64 Swarm](https://d
8250: 6f 63 73 2e 64 6f 63 6b 65 72 2e 63 6f 6d 2f 65 ocs.docker.com/e
8260: 6e 67 69 6e 65 2f 73 77 61 72 6d 2f 29 20 6f 72 ngine/swarm/) or
8270: 20 5b 6b 33 73 5d 28 68 74 74 70 73 3a 2f 2f 6b [k3s](https://k
8280: 33 73 2e 69 6f 29 2c 20 61 6e 64 20 69 74 20 63 3s.io), and it c
8290: 65 72 74 61 69 6e 6c 79 20 64 6f 65 73 6e e2 80 ertainly doesn
82a0: 99 74 20 73 75 70 70 6f 72 74 20 74 68 65 20 62 t support the b
82b0: 65 68 65 6d 6f 74 68 20 74 68 61 74 20 69 73 20 ehemoth that is
82c0: 4b 75 62 65 72 6e 65 74 65 73 2e 0d 0a 0d 0a 0d Kubernetes......
82d0: 0a 23 23 20 3c 61 20 69 64 3d 22 74 61 67 22 3e .## <a id="tag">
82e0: 3c 2f 61 3e 60 74 61 67 60 0d 0a 0d 0a 52 6f 75 </a>`tag`....Rou
82f0: 74 65 72 4f 53 20 64 6f 65 73 20 6e 6f 74 68 69 terOS does nothi
8300: 6e 67 20 6d 6f 72 65 20 77 69 74 68 20 74 61 67 ng more with tag
8310: 73 20 74 68 61 6e 20 74 6f 20 73 65 6c 65 63 74 s than to select
8320: 20 77 68 69 63 68 20 69 6d 61 67 65 20 74 6f 20 which image to
8330: 64 6f 77 6e 6c 6f 61 64 20 66 72 6f 6d 20 61 20 download from a
8340: 72 65 67 69 73 74 72 79 2e 20 57 69 74 68 6f 75 registry. Withou
8350: 74 20 61 20 6c 6f 63 61 6c 20 69 6d 61 67 65 20 t a local image
8360: 63 61 63 68 65 2c 20 79 6f 75 20 63 61 6e 6e 6f cache, you canno
8370: 74 20 72 65 2d 74 61 67 20 61 6e 20 69 6d 61 67 t re-tag an imag
8380: 65 2e 0d 0a 0d 0a 0d 0a 23 23 20 3c 61 20 69 64 e.......## <a id
8390: 3d 22 75 70 64 61 74 65 22 3e 3c 2f 61 3e 60 75 ="update"></a>`u
83a0: 70 64 61 74 65 60 0d 0a 0d 0a 54 68 65 72 65 20 pdate`....There
83b0: 69 73 20 6e 6f 20 65 71 75 69 76 61 6c 65 6e 74 is no equivalent
83c0: 20 73 68 6f 72 74 20 6f 66 20 74 68 69 73 3a 0d short of this:.
83d0: 0a 0d 0a 20 20 20 20 2f 63 6f 6e 74 61 69 6e 65 ... /containe
83e0: 72 2f 73 74 6f 70 20 30 0d 0a 20 20 20 20 e2 80 r/stop 0..
83f0: a6 77 61 69 74 20 66 6f 72 20 69 74 20 74 6f 20 wait for it to
8400: 73 74 6f 70 e2 80 a6 0d 0a 20 20 20 20 2f 63 6f stop….. /co
8410: 6e 74 61 69 6e 65 72 2f 72 65 6d 6f 76 65 20 30 ntainer/remove 0
8420: 0d 0a 20 20 20 20 2f 63 6f 6e 74 61 69 6e 65 72 .. /container
8430: 2f 61 64 64 20 e2 80 a6 0d 0a 0d 0a 54 68 65 20 /add …....The
8440: 6c 61 73 74 20 73 74 65 70 20 69 73 20 74 68 65 last step is the
8450: 20 74 72 69 63 6b 79 20 6f 6e 65 20 73 69 6e 63 tricky one sinc
8460: 65 20 60 2f 63 6f 6e 74 61 69 6e 65 72 2f 70 72 e `/container/pr
8470: 69 6e 74 60 20 73 68 6f 77 73 20 6d 6f 73 74 20 int` shows most
8480: 62 75 74 20 6e 6f 74 20 61 6c 6c 20 6f 66 20 74 but not all of t
8490: 68 65 20 6f 70 74 69 6f 6e 73 20 79 6f 75 20 67 he options you g
84a0: 61 76 65 20 74 6f 20 63 72 65 61 74 65 20 69 74 ave to create it
84b0: 2e 20 49 66 20 79 6f 75 20 64 69 64 6e e2 80 99 . If you didn’
84c0: 74 20 77 72 69 74 65 20 64 6f 77 6e 20 68 6f 77 t write down how
84d0: 20 79 6f 75 20 64 69 64 20 74 68 61 74 2c 20 79 you did that, y
84e0: 6f 75 e2 80 99 72 65 20 67 6f 69 6e 67 20 74 6f ou’re going to
84f0: 20 68 61 76 65 20 74 6f 20 77 6f 72 6b 20 74 68 have to work th
8500: 61 74 20 6f 75 74 20 74 6f 20 63 6f 6d 70 6c 65 at out to comple
8510: 74 65 20 74 68 65 20 63 6f 6d 6d 61 6e 64 20 73 te the command s
8520: 65 71 75 65 6e 63 65 2e 0d 0a 0d 0a 0d 0a 23 23 equence.......##
8530: 20 3c 61 20 69 64 3d 22 76 65 72 73 69 6f 6e 22 <a id="version"
8540: 3e 3c 2f 61 3e 60 76 65 72 73 69 6f 6e 60 0d 0a ></a>`version`..
8550: 0d 0a 57 68 69 6c 65 20 52 6f 75 74 65 72 4f 53 ..While RouterOS
8560: e2 80 99 73 20 60 63 6f 6e 74 61 69 6e 65 72 2e ’s `container.
8570: 6e 70 6b 60 20 74 65 63 68 6e 69 63 61 6c 6c 79 npk` technically
8580: 20 64 6f 65 73 20 68 61 76 65 20 61 6e 20 69 6e does have an in
8590: 64 65 70 65 6e 64 65 6e 74 20 76 65 72 73 69 6f dependent versio
85a0: 6e 20 6e 75 6d 62 65 72 20 6f 66 20 69 74 73 20 n number of its
85b0: 6f 77 6e 2c 20 69 74 20 69 73 20 6d 65 61 6e 74 own, it is meant
85c0: 20 74 6f 20 61 6c 77 61 79 73 20 6d 61 74 63 68 to always match
85d0: 20 74 68 61 74 20 6f 66 20 74 68 65 20 60 72 6f that of the `ro
85e0: 75 74 65 72 6f 73 2e 6e 70 6b 60 20 70 61 63 6b uteros.npk` pack
85f0: 61 67 65 20 79 6f 75 20 68 61 76 65 20 69 6e 73 age you have ins
8600: 74 61 6c 6c 65 64 2e 20 52 6f 75 74 65 72 4f 53 talled. RouterOS
8610: 20 61 75 74 6f 6d 61 74 69 63 61 6c 6c 79 20 75 automatically u
8620: 70 67 72 61 64 65 73 20 62 6f 74 68 20 69 6e 20 pgrades both in
8630: 6c 6f 63 6b 2d 73 74 65 70 2c 20 6d 61 6b 69 6e lock-step, makin
8640: 67 20 74 68 69 73 20 74 68 65 20 63 6c 6f 73 65 g this the close
8650: 73 74 20 65 71 75 69 76 61 6c 65 6e 74 20 63 6f st equivalent co
8660: 6d 6d 61 6e 64 3a 0d 0a 0d 0a 20 20 20 20 2f 73 mmand:.... /s
8670: 79 73 74 65 6d 2f 70 61 63 6b 61 67 65 2f 70 72 ystem/package/pr
8680: 69 6e 74 0d 0a 0d 0a 0d 0a 23 23 20 3c 61 20 69 int......## <a i
8690: 64 3d 22 77 61 69 74 22 3e 3c 2f 61 3e 60 77 61 d="wait"></a>`wa
86a0: 69 74 60 0d 0a 0d 0a 54 68 65 20 63 6c 6f 73 65 it`....The close
86b0: 73 74 20 65 71 75 69 76 61 6c 65 6e 74 20 74 6f st equivalent to
86c0: 20 74 68 69 73 20 77 6f 75 6c 64 20 62 65 20 74 this would be t
86d0: 6f 20 63 61 6c 6c 20 60 2f 63 6f 6e 74 61 69 6e o call `/contain
86e0: 65 72 2f 73 74 6f 70 60 20 69 6e 20 61 20 52 6f er/stop` in a Ro
86f0: 75 74 65 72 4f 53 20 73 63 72 69 70 74 20 61 6e uterOS script an
8700: 64 20 74 68 65 6e 20 70 6f 6c 6c 20 6f 6e 20 60 d then poll on `
8710: 2f 63 6f 6e 74 61 69 6e 65 72 2f 70 72 69 6e 74 /container/print
8720: 20 77 68 65 72 65 20 e2 80 a6 60 20 75 6e 74 69 where …` unti
8730: 6c 20 69 74 20 73 74 6f 70 70 65 64 2e 0a 5a 20 l it stopped..Z
8740: 62 35 30 61 64 30 32 66 64 61 62 38 31 65 33 65 b50ad02fdab81e3e
8750: 38 33 64 32 66 39 63 32 63 38 31 64 39 39 39 35 83d2f9c2c81d9995
8760: 0a .