I cant remember exactly, but there was some reason i needed to go priv. LXC so that i could get it to work.
My setup is
PVE 7.1.7
- ZFS main PVE array (i found a command that fixed the docker / zfs issues though looking around)
- Bunch of LXCs (some running dockerised apps, some not)
- Truenas Core
- - - Bunch of drives over multiple datasets and pools exposing a variety of SMB and NFS shares
- - - Truenas doing its truenas thing
To get the LXCs to mount the NFS share directly, OR to get the ones running docker that i also needed to mount the NFS shares in, i needed to go priv. else it wouldnt work. I cant remember exactly. But im happy to take guidence and change things if im going about it all wrong.
I remember thinking that it shouldnt be as hard as it is to do what i want to do.
I do remember i had no end of troubles with docker filling up its allotted storage until i found that command to put into the LXC.conf and its been great ever since.
Bind mounts, yes, that's the reason why you use privileged containers.
But bind mounts work with an Unprivileged tbh either, just minimal more finicky, since you meed to map users, because unprivileged containers starts with user/gids above 100000.
However that's another topic.
1. I strongly suggest you to update to pve7.4, i think since pve7.4 almost all my docker issues gone away.
2. The easiest method, simply uninstall apparmor.
The reason is simple, fixing apparmor is a pain in the ass + you run docker and the docker images probably anyway as root in your privileged lxc container.
So apparmor won't provide any additional security anyway.
3. You could still run into issues with some docker images, that won't start.
Everything that worked fine till now or works, will still work, so you don't need to have any headaches.
But when you test more and more docker images, you will probably come across the one or another, that doesn't work with zfs as backend storage.
But there is an really easy solution, creating an zfs dataset with a fixed size like 50 or 100gb and format that zfs dataset with ext4.
Mount it somewhere, like /mnt/pve/docker.
Then mount it as directory for containers in the datacenter view, and don't forget to add that mount to fstab to be persistent...
And simply move the lxc container storage on that new ext4 dataset storage.
The beauty of that way is, that that ext4 dataset storage, behaves like a normal dynamic dataset...
Means consuming only the space it's actually filled with.
I wrote an how-to here in the forums to some docker thread either, bug hell i don't want to search, forgive me
But there is everything step by step with commands.
However, i wouldn't bother with that either, as long as you didn't came across docker images that don't work....
Just remove apparmor and you're fine, i hope!
Cheers