Community discussions

MikroTik App
 
nbctcp
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 77
Joined: Tue Sep 16, 2014 7:32 pm

convert raw to docker image

Tue Feb 01, 2022 9:04 am

GOAL: convert mikrotik chr raw to docker image

STEPS:
-download chr raw image
# wget https://download.mikrotik.com/routeros/ ... c3.img.zip
# unzip chr-7.2rc3.img.zip
# guestfish-a chr-7.2rc3.img --ro
><fs> run
><fs> list-filesystems
/dev/sda1: ext2
/dev/sda2: ext3
><fs> mount /dev/sda2 /
><fs> tar-out / - | xz --best >> chr-7.2rc3.xz
# cat chr-7.2rc3.xz | docker import - chr-7.2rc3
# docker run -it chr-7.2rc3 bash

ASK:
1. how to add /dev/sda1 as boot image in docker chr-7.2rc3 image
 
felixka
Frequent Visitor
Frequent Visitor
Posts: 58
Joined: Mon Oct 19, 2020 4:12 am
Location: Canada

Re: convert raw to docker image

Tue Feb 01, 2022 6:26 pm

Docker does not boot anything. It takes an image and runs a command from it in a containerized way.
You would need a full- or paravirtualized hypervisor to boot CHR, as the CHR relies on the Kernel it comes with to perform many of the networking functions. Docker is OS-level virtualization and relies on the host system's kernel rather than running another kernel virtually.

Who is online

Users browsing this forum: MarkoB and 12 guests