Community discussions

MikroTik App
 
dc2
just joined
Topic Author
Posts: 24
Joined: Thu Jun 14, 2018 7:16 pm

7.4 beta 4 - Container --- imported OK but will not start

Fri Jun 17, 2022 1:16 pm

Hello,

I have a "hAP ac^2" I am testing on, with an external USB as disk1 (filesystem is ext4).
Installed 7.4beta4, added container package and enabled the device-mode container=yes.
Proceeded with simple setup in help-page (added veth, bridge, IP's etc).
Run:
[admin@MikroTik] > container add remote-image=alpine:latest interface=veth1 root-dir=disk1/alpine
[admin@MikroTik] > container/print 
 0 name="b57c5449-c006-4d97-9b93-b9687d2f8c79" tag="library/alpine:latest" os="linux" arch="arm" interface=veth1 root-dir=disk1/alpine 
   mounts="" dns="" status=stopped 
[admin@MikroTik] > container/start 0

[admin@MikroTik] > container/print 
 0 name="b57c5449-c006-4d97-9b93-b9687d2f8c79" tag="library/alpine:latest" os="linux" arch="arm" interface=veth1 root-dir=disk1/alpine 
   mounts="" dns="" status=stopped 
[admin@MikroTik] > 

So the container will not start. Similarly with
 ubuntu:latest 

(also pulled succesfully).

What should I look at next? What info might you need from me for suggestions?

Thank you
 
User avatar
antonsb
MikroTik Support
MikroTik Support
Posts: 385
Joined: Sun Jul 24, 2016 3:12 pm
Location: Riga, Latvia

Re: 7.4 beta 4 - Container --- imported OK but will not start

Fri Jun 17, 2022 1:46 pm

probably not enough memory for downloading and extracting layers. Use pre-build or pre-fetched image instead. Variant B or C in docs
 
fragtion
Member Candidate
Member Candidate
Posts: 257
Joined: Fri Nov 13, 2009 10:08 pm
Location: Johannesburg, South Africa

Re: 7.4 beta 4 - Container --- imported OK but will not start

Fri Jun 17, 2022 2:38 pm

similar thing here with RB5009 (lots of memory ?)
[admin@rb5009] > /container/config/set registry-url=https://registry-1.docker.io
[admin@rb5009] > container add remote-image=ubuntu:latest interface=veth1 root-dir=disk1/ubuntu logging=yes
[admin@rb5009] > /container/print 
 0 name="73878b3d-cfee-45d9-bb7c-bf8baf0f14f6" tag="library/ubuntu:latest" os="linux" arch="arm64" interface=veth1 
   root-dir=disk1/ubuntu mounts="" dns="" logging=yes status=stopped 
[admin@rb5009] > /container/start number=0
[admin@rb5009] > /container/print 
 0 name="73878b3d-cfee-45d9-bb7c-bf8baf0f14f6" tag="library/ubuntu:latest" os="linux" arch="arm64" interface=veth1 root-dir=disk1/ubuntu mounts="" dns="" logging=yes status=running 
[admin@rb5009] > /container/print 
 0 name="73878b3d-cfee-45d9-bb7c-bf8baf0f14f6" tag="library/ubuntu:latest" os="linux" arch="arm64" interface=veth1 root-dir=disk1/ubuntu mounts="" dns="" logging=yes status=stopped 
[admin@rb5009] > /container/print 
 0 name="73878b3d-cfee-45d9-bb7c-bf8baf0f14f6" tag="library/ubuntu:latest" os="linux" arch="arm64" interface=veth1 root-dir=disk1/ubuntu mounts="" dns="" logging=yes status=stopped 
[admin@rb5009] >  
it runs for a moment (<1s) and then stops. same with debian image. in my case disk1 is an 8gb usb2 flash drive freshly formatted in winbox as ext4, but same behavior if I try to it on the device's storage

Edit: pihole image is working, so yes it's probably something to do with the images ?
Last edited by fragtion on Fri Jun 17, 2022 3:21 pm, edited 1 time in total.
 
dc2
just joined
Topic Author
Posts: 24
Joined: Thu Jun 14, 2018 7:16 pm

Re: 7.4 beta 4 - Container --- imported OK but will not start

Fri Jun 17, 2022 3:03 pm

I try method B from the docs, for both alpine:latest architecture /arm/v6 and /arm/v7 , and I get the same error for both cases (BTW, which one should I use?):
 error: could not find image manifest in archive 

the digests used to pull were, respectively:
sha256:3c66139adbd2513f9fc56eff206513ffc8356b282bed31a4e74c7eb926b850aa --- armv6
sha256:0615cdd745d0b78e7e6ac3a7b1f02e4daefa664eae0324120955f4e4c91bea3f --- armv7

any ideas?
 
dc2
just joined
Topic Author
Posts: 24
Joined: Thu Jun 14, 2018 7:16 pm

Re: 7.4 beta 4 - Container --- imported OK but will not start

Sat Jun 18, 2022 1:03 am

Tried alpine : latest on Rb4011 as well, same results...
 
TheNetworkBerg
just joined
Posts: 15
Joined: Mon Sep 30, 2019 9:50 am

Re: 7.4 beta 4 - Container --- imported OK but will not start

Sun Jun 19, 2022 10:33 am

I can confirm method B does not work for the alpine container either. What containers are actually working besides pihole?
 
VBfromZP
just joined
Posts: 1
Joined: Sun Jun 19, 2022 12:58 pm

Re: 7.4 beta 4 - Container --- imported OK but will not start

Sun Jun 19, 2022 1:06 pm

Try enable logging for Container

/system/logging/add topics=container action=memory
and
/container/set logging=yes numbers=0

I used A method to deploy PiHole container on my RB4011 and it works but not 100%
PiHole starts but if i try change settings nothing happen and i see error in logs - sudo: effective uid is not 0, is /usr/bin/sudo on a file system with the 'nosuid' option set or an NFS file system without root privileges?
 
User avatar
antonsb
MikroTik Support
MikroTik Support
Posts: 385
Joined: Sun Jul 24, 2016 3:12 pm
Location: Riga, Latvia

Re: 7.4 beta 4 - Container --- imported OK but will not start

Mon Jun 20, 2022 11:39 am


it runs for a moment (<1s) and then stops. same with debian image. in my case disk1 is an 8gb usb2 flash drive freshly formatted in winbox as ext4, but same behavior if I try to it on the device's storage
are you running any command inside container? If not this is how it should behave.

try runnign sshd for example. add Dockerfile with contents:
FROM alpine:latest

RUN \
  apk update && \
  apk add openrc --no-cache && \
  apk add openssh-server && \
  rc-update add sshd && \
  rc-status && \
  touch /run/openrc/softlevel && \
  echo "PermitRootLogin yes" >> /etc/ssh/sshd_config
RUN echo "root:root" | chpasswd
EXPOSE 22
CMD ["sh" , "-c", "service sshd restart && sh && tail -f /dev/null"]
then run:
docker buildx build  --no-cache --platform arm -t test_arm64 .
docker save test_arm64 > test_arm.tar
 
fragtion
Member Candidate
Member Candidate
Posts: 257
Joined: Fri Nov 13, 2009 10:08 pm
Location: Johannesburg, South Africa

Re: 7.4 beta 4 - Container --- imported OK but will not start

Mon Jun 20, 2022 1:34 pm

are you running any command inside container? If not this is how it should behave.
Ok Interesting! I'll try it like that & expecting good results. Thanks:)
 
dc2
just joined
Topic Author
Posts: 24
Joined: Thu Jun 14, 2018 7:16 pm

Re: 7.4 beta 4 - Container --- imported OK but will not start

Tue Jun 21, 2022 4:35 pm

I did BUILDX from your Dockerfile and uploaded to Docker Hub and got running containers for platforms linux/arm/v6 and linux/arm/v7 on the hAP ac^2 (both installed from remote-image=... )

Both images running.

Q1: which should I use for hAP ac^2, v6 or v7? for RB4011?

Q2: I try to ping / SSH into the containers (bridge address 172.17.0.1, container veth addresses 172.17.0.2 and 172.17.03 for the 2 containers respectively). Only 172.17.0.2 is accessible, any suggestions? Thank you
 
kobuki
Member Candidate
Member Candidate
Posts: 198
Joined: Sat Apr 02, 2011 5:59 pm

Re: 7.4 beta 4 - Container --- imported OK but will not start

Sat Jul 09, 2022 8:24 pm

All base OS images need a command to run, otherwise they're just a bunch of files extracted to the overlay FS. It would be nice to be able to spec the command to be run even for these images in ROS, like for standard docker tools.
 
elbob2002
Member Candidate
Member Candidate
Posts: 252
Joined: Tue May 15, 2018 8:15 pm
Location: Ireland

Re: 7.4 beta 4 - Container --- imported OK but will not start

Sun Jul 10, 2022 6:52 pm

You mean like this? 7.4RC2
ContainterParams.png
You do not have the required permissions to view the files attached to this post.
 
kobuki
Member Candidate
Member Candidate
Posts: 198
Joined: Sat Apr 02, 2011 5:59 pm

Re: 7.4 beta 4 - Container --- imported OK but will not start

Sun Jul 10, 2022 7:57 pm

There are no port mappings in this config panel, will they be added later?
 
piku
newbie
Posts: 48
Joined: Sat Feb 10, 2018 10:59 am

Re: 7.4 beta 4 - Container --- imported OK but will not start

Thu Aug 25, 2022 2:00 am

I did BUILDX from your Dockerfile and uploaded to Docker Hub and got running containers for platforms linux/arm/v6 and linux/arm/v7 on the hAP ac^2 (both installed from remote-image=... )

Both images running.

Q1: which should I use for hAP ac^2, v6 or v7? for RB4011?

Q2: I try to ping / SSH into the containers (bridge address 172.17.0.1, container veth addresses 172.17.0.2 and 172.17.03 for the 2 containers respectively). Only 172.17.0.2 is accessible, any suggestions? Thank you
both armv6 and armv7 works on my rb4011, alpine.
neither armv6 nor armv7 not works on my rb4011, busybox.
yes i'm using buildx too.

veth ip shuld be set before container created. it won't be change after container deployed.
 
piku
newbie
Posts: 48
Joined: Sat Feb 10, 2018 10:59 am

Re: 7.4 beta 4 - Container --- imported OK but will not start

Thu Aug 25, 2022 2:04 am

There are no port mappings in this config panel, will they be added later?
there is :) ip - firewall - nat

Who is online

Users browsing this forum: No registered users and 9 guests