Community discussions

MikroTik App
 
Arthur2000
just joined
Topic Author
Posts: 4
Joined: Wed Jul 12, 2023 9:40 am

how to transfer files in/out container?

Thu Nov 30, 2023 11:35 am

Since Mikrotik RouterOS container doesn't have "docker cp x y" cmd, so how to transfer files in/out container?

Please don't tell me the workaround methods like:
  • mount disk/partition/folder as swap area
  • install sshd(scp) or ftp in container
  • use curl/wget inside container to fetch file from outer http server
  • copy/paste base64 strings for binary file

Any official solution?
 
optio
Long time Member
Long time Member
Posts: 694
Joined: Mon Dec 26, 2022 2:57 pm

Re: how to transfer files in/out container?

Thu Nov 30, 2023 6:20 pm

You cannot have r/w mounted directory on both systems, directory mounted as r/w for ROS is read-only in container, files in directory mounted as r/w for container are not accessible from ROS (container store), so you have options are you don't want to hear. :) There is .type file in mounted directory which defines this logic.

P.S.
Maybe option can be to mount directory over NFS from external system with ROSE storage and then mount that directory into container and also put .type file with content container in it. This directory should be writable in container and on external system from where is mounted. This is just suggestion to try, not sure if will work, I cannot install ROSE storage on my device to check.

Who is online

Users browsing this forum: No registered users and 6 guests