Community discussions

MikroTik App
 
ccbb
just joined
Topic Author
Posts: 5
Joined: 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?
 
User avatar
sirbryan
Member Candidate
Member Candidate
Posts: 298
Joined: Fri May 29, 2020 6:40 pm
Location: Utah
Contact:

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

Thu Dec 22, 2022 4:50 pm

Do you have logging enabled? What does that say?
 
ccbb
just joined
Topic Author
Posts: 5
Joined: 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
/container/config/set registry-url=https://registry-1.docker.io tmpdir=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

/container/envs/add env_list=linux_envs key=PASSWD value="letmein"
/container/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
 
ccbb
just joined
Topic Author
Posts: 5
Joined: Thu Dec 22, 2022 2:26 pm

Re: 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
 
User avatar
antonsb
MikroTik Support
MikroTik Support
Posts: 385
Joined: Sun Jul 24, 2016 3:12 pm
Location: Riga, Latvia

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

Fri Dec 23, 2022 2:54 pm

You can use armvirt target -
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
 
ccbb
just joined
Topic Author
Posts: 5
Joined: Thu Dec 22, 2022 2:26 pm

Still not, as before

Fri Dec 23, 2022 8:30 pm

Still not, as before

docker import https://downloads.openwrt.org/snapshots ... tfs.tar.gz openwrt-arm64
docker save openwrt-arm64 > openwrt_arm64.tar
 
User avatar
sirbryan
Member Candidate
Member Candidate
Posts: 298
Joined: Fri May 29, 2020 6:40 pm
Location: Utah
Contact:

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

Fri Dec 23, 2022 10:14 pm

I set "CMD" to
 cmd="/bin/sh -c \"while ((true)); do sleep 1; done\"" 
then connect to the console (
/container; 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.
 
User avatar
sirbryan
Member Candidate
Member Candidate
Posts: 298
Joined: Fri May 29, 2020 6:40 pm
Location: Utah
Contact:

Re: 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.
 
User avatar
antonsb
MikroTik Support
MikroTik Support
Posts: 385
Joined: Sun Jul 24, 2016 3:12 pm
Location: Riga, Latvia

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

Tue Dec 27, 2022 5:01 pm

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
/ # cat /etc/banner
  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 -----------------------------------------------------
 OpenWrt SNAPSHOT, r21603-fb15cb4ce9
 -----------------------------------------------------
 
User avatar
sirbryan
Member Candidate
Member Candidate
Posts: 298
Joined: Fri May 29, 2020 6:40 pm
Location: Utah
Contact:

Re: 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?
 
User avatar
antonsb
MikroTik Support
MikroTik Support
Posts: 385
Joined: Sun Jul 24, 2016 3:12 pm
Location: Riga, Latvia

Re: 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
 
User avatar
sirbryan
Member Candidate
Member Candidate
Posts: 298
Joined: Fri May 29, 2020 6:40 pm
Location: Utah
Contact:

Re: 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.
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.
 
elico
Member Candidate
Member Candidate
Posts: 143
Joined: Mon Nov 07, 2016 3:23 am

Re: 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.
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
 
User avatar
sirbryan
Member Candidate
Member Candidate
Posts: 298
Joined: Fri May 29, 2020 6:40 pm
Location: Utah
Contact:

Re: 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.
 
AresPo
just joined
Posts: 11
Joined: Thu Sep 02, 2021 7:06 pm

Re: 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.
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)
 
vuducdong
just joined
Posts: 4
Joined: Sat Jul 25, 2020 5:46 pm

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

Sun Oct 08, 2023 11:26 am

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.
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
Please give complete instructions to install openwrt container. Thanks!

Who is online

Users browsing this forum: No registered users and 2 guests