Page 1 of 1

[Help] Folder settings for docker container

Posted: 26 Apr 2025, 06:31
by jnbixler
Hi, quite new to Docker and to TOS6, and have a question about best practices for file locations; I am trying to set up a container for Kopia, I found an image and downloaded it, and now looking at the installations settings here:

https://kopia.io/docs/installation/#docker-images

Apparently I need to mount a number of local volumes, like so:

Code: Select all

# Mount local folders needed by kopia
            - /path/to/config/dir:/app/config
            - /path/to/cache/dir:/app/cache
            - /path/to/logs/dir:/app/logs
            # Mount local folders to snapshot
            - /path/to/data/dir:/data:ro
            # Mount repository location
            - /path/to/repository/dir:/repository
            # Mount path for browsing mounted snaphots
            - /path/to/tmp/dir:/tmp:shared
My question is, what would be the preferred location to mount these (aka the "/path/to/config/dir:)? Would it be my user home folder, or somewhere else? As a side note, I'm a little confused on the role of the home folder in TOS - I always thought it was for keeping personal files, but I read in another comment that it's not intended for data storage. What is it meant to be used for?

Appreciate any advice!

Re: [Help] Folder settings for docker container

Posted: 26 Apr 2025, 13:55
by TMnick
jnbixler wrote: 26 Apr 2025, 06:31
Hello, sorry for the delay. Here are the answers to your questions:

1.Regarding the script’s mount directories:
The script does have default mount paths (e.g., /app/config, /data). These are already optimized for the Kopia container, and there’s no need to reselect alternative locations unless you have specific requirements.
2.Regarding the /home directory:
While the /home directory can store data, its primary purpose on a multi-user NAS is to host personal directories for each user (e.g., /home/user1, /home/user2). This is because the NAS supports multiple users and needs a dedicated space to store their personal data—that’s the role of /home.

Re: [Help] Folder settings for docker container

Posted: 27 Apr 2025, 06:43
by jnbixler
Hi, thanks for getting back to me!

1. Sorry, I'm still a little confused, don't I need to specify a root directory for those paths? "/path/to/config/dir:/app/config" wouldn't work as-is, right? Would it be something like "homes/[myusername]/docker/kopia/app/config"?

2. Thanks, that makes sense! I didn't realize you could set up a new share folder within the user directory.

Re: [Help] Folder settings for docker container

Posted: 27 Apr 2025, 08:57
by EthanLiu
jnbixler wrote: 27 Apr 2025, 06:43
The specific path configuration for mount directories can be flexibly set by users according to their actual requirements. Although Docker image authors may pre-define recommended mount paths in the base configuration (such as /var/lib/mysql for database data and /etc/nginx/conf.d for configuration files), as a container user, you have full authority to override the default mount points and extend your mounting needs as necessary.

Re: [Help] Folder settings for docker container  [SOLVED]

Posted: 27 Apr 2025, 12:40
by jnbixler
Got it, I think I got it working... Thanks for the help!

Re: [Help] Folder settings for docker container

Posted: 15 May 2025, 11:43
by straightforward
The home directory on TOS is typically reserved for storing files and configurations related to your user account on the TOS system (e.g. application configurations, personal files you upload via the TOS user interface).

Re: [Help] Folder settings for docker container

Posted: 20 May 2025, 12:06
by amorapottera
Don’t use /home/username or your user folder unless you’re experimenting. And always mount folders with the correct permissions (ro for read-only, shared if needed).