Community discussions

MikroTik App
 
User avatar
dynek
Member Candidate
Member Candidate
Topic Author
Posts: 223
Joined: Tue Jan 21, 2014 10:03 pm

Create container store directory ?

Wed Jul 05, 2023 9:22 am

Hello,

I've been having a hard time understanding how mounts work.
I tried to create some directory I needed with a config file inside of it and kept seeing "permission denied" from within the container from the mount point.
Looks like the container must be started once, the directory mount point will be created, and then it can be used.

Any way to create a container store using sftp before the container is started ?

Thank you
 
ConradPino
Member
Member
Posts: 337
Joined: Sat Jan 21, 2023 12:44 pm
Contact:

Re: Create container store directory ?

Mon Aug 28, 2023 8:22 am

I'm bringup https://hub.docker.com/r/ubuntu/bind9 on hAP ax3. I'll share what I've learned so far.
Mounts have two flavors: (1) file mount, typically configuration file with predefined content, and (2) directory mount, typically empty directory work area to persist content beyond container removal.
Lessons learned so far: (A) file or at least directory must exist before scp or sftp can upload content, (B) DO NOT create empty mount directories before launch, (C) container manager completes mount creaton at launch and appears to define permissions which can't be done in RouterOS which lacks a complete file manager..

The BIND 9 image fails horribly with empty configuration as it tries to write one but doesn't have write permission in parent directory.
The BIND 9 image will start without any mounts and runs with the environment setup alone.

TL;DR setup files with predefined content only; container will do the rest at launch.

Who is online

Users browsing this forum: No registered users and 3 guests