I plan to have several Docker container apps on my OMV server. I am establishing a pattern which I would like to follow for all containers to follow. So I want to do the first one correctly.
I feel it is useful to provide a consistent naming convention to organize my folders. And I take the suggestions in the Docker plugin wiki seriously about keeping each container separated and using its own container root mapped to an agent user with reduced privileges. My questions are at the bottom.
So I deviate slightly from the Docker plugin wiki naming convention...
OMV>Storage>Shared Folders>
/srv/dev-disk-by-uuid-8d7f318f-4fa6-4621-b0e6-5203134f3b22/docker
/srv/dev-disk-by-uuid-8d7f318f-4fa6-4621-b0e6-5203134f3b22/docker_apps
/srv/dev-disk-by-uuid-8d7f318f-4fa6-4621-b0e6-5203134f3b22/docker_backup
OMV>Services>Compose>Settings>
Compose Files (Wiki "appdata")
docker_apps [on /dev/nvme0n1p1, docker_apps/]
root:root
Administrator - read/write, Users - No access, Others - No access
Backup (Wiki "compose_backup")
docker_backup [on /dev/nvme0n1p1, docker_backup/]
Docker storage (Wiki "docker")
docker [on //dev/nvme0n1p1, docker/]
My containers' future configuration therefore...
Fing Agent
docker_apps/fing/
docker_apps/fing/config/
Other
docker_apps/other/
docker_apps/other/config/
New users for the containers...
sudo useradd -U fingagent
sudo passwd fingagent
sudo id fingagent
uid=1007(fingagent) gid=1011(fingagent) groups=1011(fingagent)
sudo useradd -U otheragent
sudo passwd otheragent
sudo id otheragent
uid=1008(otheragent) gid=1012(otheragent) groups=1012(otheragent)
The questions:
1. Do I still need to create new users and groups in the OMV>Users tab? (I note that if I do then they are added to the group gid=100(users). But if I do not, they do not display in the OMV>Users or OMV>Groups tabs even though they exist in Linux...?
2. Do I need to make the subdirectories using the CLI like shown, or is there some "magic" in the Docker plugin that will create these subfolders for me?
cd /srv/dev-disk-by-uuid-8d7f318f-4fa6-4621-b0e6-5203134f3b22/docker_apps
mkdir fing
cd fing
mkdir config
3. Should and how it is recommended I set the permissions of the docker_apps container and container config subfolders? Is the owner root:fingagent or fingagent:fingagent? How is it that both root and the Docker agent users will have access to the container config subfolders?
chown -R root:fingagent /srv/dev-disk-by-uuid-8d7f318f-4fa6-4621-b0e6-5203134f3b22/docker_apps/fing
chmod -R 770 /srv/dev-disk-by-uuid-8d7f318f-4fa6-4621-b0e6-5203134f3b22/docker_apps/fing
chown -R root:otheragent /srv/dev-disk-by-uuid-8d7f318f-4fa6-4621-b0e6-5203134f3b22/docker_apps/other
chmod -R 770 /srv/dev-disk-by-uuid-8d7f318f-4fa6-4621-b0e6-5203134f3b22/docker_apps/other
Thank you very much in advance.
P.S. This <thread> touches on similar installation questions and was very helpful.