Community discussions

MikroTik App
 
abbio90
Member Candidate
Member Candidate
Topic Author
Posts: 163
Joined: Fri Aug 27, 2021 9:16 pm
Contact:

failure "Could not import"

Tue May 30, 2023 9:43 pm

Hi all, I wanted to install ubuntu in a mikrotik CHR. I followed the mikrotik help but something is wrong. I'll tell you what I did:

Installed the Container package

from terminal I enabled the package
/system device-mode update container=yes
after that i shut down the vM to complete the process. I would say the package is active
/system device-mode print
  mode: enterprise
container: yes
Then I downloaded the ubuntu iso image.
/tool fetch url="https://releases.ubuntu.com/22.04.2-live-server-amd64.iso" mode=https
in this way I find the ISO image in the file menu correctly downloaded
/container config set registry-url=https://registry-1-docker.io tmpdir=disk1/pull
/container add file=ubuntu.iso hostname=Ubuntu interface=veth1 root-dir=disk1/pull


this last string gives me a "could not import" error. Where am I wrong? the interface, bridge, nat etc part is all ok even if i didn't indicate every single step.
 
holvoetn
Forum Guru
Forum Guru
Posts: 5323
Joined: Tue Apr 13, 2021 2:14 am
Location: Belgium

Re: failure "Could not import"

Tue May 30, 2023 9:52 pm

You want to run full blown Ubuntu iso in a container on chr ?
Try a container version. They exist.
E.g. ubuntu:latest
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 11967
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: failure "Could not import"

Tue May 30, 2023 10:06 pm

If is a CHR, why do not install Ubuntu on the same real machine inside the virtualizator that already run the CHR???
 
abbio90
Member Candidate
Member Candidate
Topic Author
Posts: 163
Joined: Fri Aug 27, 2021 9:16 pm
Contact:

Re: failure "Could not import"

Tue May 30, 2023 10:07 pm

actually I just need a Linux CLI only without desktop, it has to run a pynthon3 script. you say the problem is the ubuntu version i chose?
 
abbio90
Member Candidate
Member Candidate
Topic Author
Posts: 163
Joined: Fri Aug 27, 2021 9:16 pm
Contact:

Re: failure "Could not import"

Tue May 30, 2023 10:08 pm

If is a CHR, why do not install Ubuntu on the same real machine inside the virtualizator that already run the CHR???
because the CHR runs in a datacenter under a VPS, and I don't have access to the vortializer
 
holvoetn
Forum Guru
Forum Guru
Posts: 5323
Joined: Tue Apr 13, 2021 2:14 am
Location: Belgium

Re: failure "Could not import"

Tue May 30, 2023 10:10 pm

@rex
That thought has crossed my mind as well but I guess OP had his reasons to use container.

Anyhow. Important to note that a container environment is not the same as a virtualization environment.
Not by a long shot.

Try Alpine docker container.
I think tangent made a docker container even smaller then that.
 
holvoetn
Forum Guru
Forum Guru
Posts: 5323
Joined: Tue Apr 13, 2021 2:14 am
Location: Belgium

Re: failure "Could not import"

Tue May 30, 2023 10:13 pm

Or this, dedicated to python.

https://hub.docker.com/_/python
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 11967
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: failure "Could not import"

Tue May 30, 2023 10:19 pm

If is a CHR, why do not install Ubuntu on the same real machine inside the virtualizator that already run the CHR???
because the CHR runs in a datacenter under a VPS, and I don't have access to the vortializer
Ci dovevo provare ;)
 
holvoetn
Forum Guru
Forum Guru
Posts: 5323
Joined: Tue Apr 13, 2021 2:14 am
Location: Belgium

Re: failure "Could not import"

Tue May 30, 2023 10:29 pm

@abbio90
You may also want to read this to understand why that iso does not run as a container.

https://tangentsoft.com/mikrotik/wiki?n ... +Not+VMs&p
 
abbio90
Member Candidate
Member Candidate
Topic Author
Posts: 163
Joined: Fri Aug 27, 2021 9:16 pm
Contact:

Re: failure "Could not import"

Tue May 30, 2023 10:45 pm

Or this, dedicated to python.

https://hub.docker.com/_/python
this seems to run like docker on linux. how do i install it on mikrotik?
 
holvoetn
Forum Guru
Forum Guru
Posts: 5323
Joined: Tue Apr 13, 2021 2:14 am
Location: Belgium

Re: failure "Could not import"

Tue May 30, 2023 10:48 pm

Just checked the link I provided, it might be a tad too complicated to start, yes.
Maybe best to start with Alpine container, open shell into it, then experiment with it.

Follow the instructions from Mikrotik help pages on container.
Only instead of PiHole, pull the container you need.
 
abbio90
Member Candidate
Member Candidate
Topic Author
Posts: 163
Joined: Fri Aug 27, 2021 9:16 pm
Contact:

Re: failure "Could not import"

Tue May 30, 2023 10:50 pm

maybe i should install this, although i didn't figure out where to download it from this site https://hub.docker.com/_/ubuntu
 
holvoetn
Forum Guru
Forum Guru
Posts: 5323
Joined: Tue Apr 13, 2021 2:14 am
Location: Belgium

Re: failure "Could not import"

Tue May 30, 2023 10:57 pm

You really need to read up and learn some things on your own ...

https://help.mikrotik.com/docs/display/ROS/Container
Example for pi-hole

/container/add remote-image=pihole/pihole:latest interface=veth1 root-dir=disk1/pihole mounts=dnsmasq_pihole,etc_pihole envlist=pihole_envs
This is what will pull the image and install it as a container.

Your Ubuntu container will be ubuntu:latest in stead of pihole/pihole:latest
The virtual interface, you need to define for yourself.
Where to put the files on your device: same. Up to you.
Mounts to perform: same. up to you where to place them (those are the mounts which will persist when you change the container) (I couldn't find any right away in any install instructions. You may need to search a bit)
environment list: same (and same remark).

Alpine container is a lot smaller.

Who is online

Users browsing this forum: No registered users and 4 guests