Community discussions

MikroTik App
ccbb
刚刚加入了
Topic Author
Posts: 5
加入: Thu Dec 22, 2022 2:26 pm

Mikrotik CCR2004-1G-12S+2X's container

Thu Dec 22, 2022 4:15 pm

Mikrotik CCR2004-1G-12S+2X's rom is too small, only 128M, but it has 4G RAM, so it has set ramdisk=1G, but the openwrt image in the container cannot run. After running, it is stopped immediately. What's the reason?
Top
用户头像
sirbryan
Member Candidate
Member Candidate
Posts: 252
加入: Fri May 29, 2020 6:40 pm

再保险:雷竞技网站Mikrotik CCR2004-1G-12S+2X's container

Thu Dec 22, 2022 4:50 pm

Do you have logging enabled? What does that say?
Top
ccbb
刚刚加入了
Topic Author
Posts: 5
加入: Thu Dec 22, 2022 2:26 pm

logging=yes Re: Mikrotik CCR2004-1G-12S+2X's container

Fri Dec 23, 2022 12:45 pm

logging=yes

/system/device-mode/update container=yes
/disk add type=tmpfs tmpfs-max-size=1000M slot=RAM
/集装箱r/config/set registry-url=https://registry-1.docker.iotmpdir=RAM

/interface/veth/add name=veth1 address=172.17.0.2/16 gateway=172.17.0.1
/interface/bridge/add name=dockers
/ip/address/add address=172.17.0.1/16 interface=dockers
/interface/bridge/port add bridge=dockers interface=veth1
/ip/firewall/nat/add chain=srcnat action=masquerade src-address=172.17.0.0/16

/集装箱r/envs/add env_list=linux_envs key=PASSWD value="letmein"
/集装箱r/mounts/add name=linux_data src=RAM/docker/linux_data dst=/data

add remote-image=unifreq/openwrt-aarch64:latest interface=veth1 envlist=linux_envs root-dir=RAM/docker/linux_root mounts=linux_data hostname=openwrt
Top
ccbb
刚刚加入了
Topic Author
Posts: 5
加入: Thu Dec 22, 2022 2:26 pm

再保险:雷竞技网站Mikrotik CCR2004-1G-12S+2X's container

Fri Dec 23, 2022 1:02 pm

about logging file

getting layer sha256:a78819ced238e05f3cc7811c2f5c370be2125586cdf224ac204293083f7bc4da
layer sha256:a78819ced238e05f3cc7811c2f5c370be2125586cdf224ac204293083f7bc4da downloaded
import successful, container 2f370818-f547-404b-89b5-e65c453199b7
Top
antonsb
MikroTik Support
MikroTik Support
Posts: 371
加入: Sun Jul 24, 2016 3:12 pm
Location:Riga, Latvia

再保险:雷竞技网站Mikrotik CCR2004-1G-12S+2X's container

Fri Dec 23, 2022 2:54 pm

You can use armvirt target -
Code:Select all
docker import https://downloads.openwrt.org/snapshots/targets/armvirt/64/openwrt-armvirt-64-default-rootfs.tar.gz openwrt-arm64 docker save openwrt-arm64 > openwrt_arm64.tar
Top
ccbb
刚刚加入了
Topic Author
Posts: 5
加入: Thu Dec 22, 2022 2:26 pm

Still not, as before

Fri Dec 23, 2022 8:30 pm

Still not, as before

docker importhttps://downloads.openwrt.org/snapshots ... tfs.tar.gzopenwrt-arm64
docker save openwrt-arm64 > openwrt_arm64.tar
Top
用户头像
sirbryan
Member Candidate
Member Candidate
Posts: 252
加入: Fri May 29, 2020 6:40 pm

再保险:雷竞技网站Mikrotik CCR2004-1G-12S+2X's container

Fri Dec 23, 2022 10:14 pm

I set "CMD" to
Code:Select all
cmd="/bin/sh -c \"while ((true)); do sleep 1; done\""
then connect to the console (
Code:Select all
/集装箱r; shell 0
or whatever # the container is) and poke around. For some containers, I figure out that there's a permissions problem, or some app is missing a library, or it can't find a file it's looking for.
Top
用户头像
sirbryan
Member Candidate
Member Candidate
Posts: 252
加入: Fri May 29, 2020 6:40 pm

再保险:雷竞技网站Mikrotik CCR2004-1G-12S+2X's container

Sat Dec 24, 2022 12:01 am

I've tried it on the same exact setup and I, too, can't keep the container running. I'll have to test on another machine without a RAM disk and on 7.6.
Top
antonsb
MikroTik Support
MikroTik Support
Posts: 371
加入: Sun Jul 24, 2016 3:12 pm
Location:Riga, Latvia

再保险:雷竞技网站Mikrotik CCR2004-1G-12S+2X's container

2022年12月27日,星期二下午5:01

Thanks, I managed to repeat this issue. This was broken somewhere from stable 7.6 to rc, release.
You can use 7.6 for now, as bare Openwrt uses only 8.8MB on arm64 systems
Code:Select all
/ # cat /etc/banner _______ ________ __ | |.-----.-----.-----.| | | |.----.| |_ | - || _ | -__| || | | || _|| _| |_______|| __|_____|__|__||________||__| |____| |__| W I R E L E S S F R E E D O M ----------------------------------------------------- OpenWrt SNAPSHOT, r21603-fb15cb4ce9 -----------------------------------------------------
Top
用户头像
sirbryan
Member Candidate
Member Candidate
Posts: 252
加入: Fri May 29, 2020 6:40 pm

再保险:雷竞技网站Mikrotik CCR2004-1G-12S+2X's container

Wed Dec 28, 2022 7:11 am

Thanks, I managed to repeat this issue. This was broken somewhere from stable 7.6 to rc, release.
You can use 7.6 for now, as bare Openwrt uses only 8.8MB on arm64 systems
So what exactly is broken? Use of the RAM disk for container storage?
Top
antonsb
MikroTik Support
MikroTik Support
Posts: 371
加入: Sun Jul 24, 2016 3:12 pm
Location:Riga, Latvia

再保险:雷竞技网站Mikrotik CCR2004-1G-12S+2X's container

Wed Dec 28, 2022 11:06 am

So what exactly is broken? Use of the RAM disk for container storage?
In this case, cause is not related to tmpfs
Top
用户头像
sirbryan
Member Candidate
Member Candidate
Posts: 252
加入: Fri May 29, 2020 6:40 pm

再保险:雷竞技网站Mikrotik CCR2004-1G-12S+2X's container

Wed Dec 28, 2022 8:16 pm

Nice.

Downgraded my router to 7.6, then got the container working. Snapshot versions don't have a GUI, so this is what I ended up preparing for the router.
Code:Select all
docker import https://downloads.openwrt.org/releases/22.03.2/targets/armvirt/64/openwrt-22.03.2-armvirt-64-default-rootfs.tar.gz openwrt-arm64 docker save openwrt-arm64 > openwrt_arm64.tar
And with that, we have a GUI:
Screenshot 2022-12-28 at 11.15.10 AM.png
You do not have the required permissions to view the files attached to this post.
Top
elico
Member Candidate
Member Candidate
Posts: 110
加入: Mon Nov 07, 2016 3:23 am

再保险:雷竞技网站Mikrotik CCR2004-1G-12S+2X's container

Tue Jan 10, 2023 4:37 am

Downgraded from 7.7 to 7.6?
Nice.

Downgraded my router to 7.6, then got the container working. Snapshot versions don't have a GUI, so this is what I ended up preparing for the router.
Code:Select all
docker import https://downloads.openwrt.org/releases/22.03.2/targets/armvirt/64/openwrt-22.03.2-armvirt-64-default-rootfs.tar.gz openwrt-arm64 docker save openwrt-arm64 > openwrt_arm64.tar
And with that, we have a GUI:

Screenshot 2022-12-28 at 11.15.10 AM.png
Top
用户头像
sirbryan
Member Candidate
Member Candidate
Posts: 252
加入: Fri May 29, 2020 6:40 pm

再保险:雷竞技网站Mikrotik CCR2004-1G-12S+2X's container

Tue Jan 10, 2023 6:51 am

Downgraded from 7.7 to 7.6?
Yeah. I had upgraded to 7.7 to try the RAM disk. Switched back to 7.6 and just used the NAND.
Top
AresPo
刚刚加入了
Posts: 10
加入: Thu Sep 02, 2021 7:06 pm

再保险:雷竞技网站Mikrotik CCR2004-1G-12S+2X's container

Sat May 06, 2023 8:35 pm

Nice.

Downgraded my router to 7.6, then got the container working. Snapshot versions don't have a GUI, so this is what I ended up preparing for the router.
Code:Select all
docker import https://downloads.openwrt.org/releases/22.03.2/targets/armvirt/64/openwrt-22.03.2-armvirt-64-default-rootfs.tar.gz openwrt-arm64 docker save openwrt-arm64 > openwrt_arm64.tar
And with that, we have a GUI:

Screenshot 2022-12-28 at 11.15.10 AM.png
Hello
Is it possible for you to fully explain the installation method? I did the settings according to the official Mikrotik videos on YouTube and followed your instructions on both 7.9 and 7.6 but still got the error that it wouldn't run.

----

update:

My router model is ax3 and it seems that none of the branches are working at the moment! (armvirt)
Top

Who is online

Users browsing this forum: No registered users and 5 guests