• 0 Posts
  • 47 Comments
Joined 1 year ago
cake
Cake day: July 13th, 2023

help-circle
  • The issue is that the docker container will still be running as the LXC’s root user even if you specify another user to run as in the docker compose file or run command, and if root doesn’t have access to the dir the container will always fail.

    The solution to this is to remap the unprivileged LXC’s root user to a user on the Proxmox host that has access to the dir using the LXC’s config file, mount the container’s filesystem using pct mount, and then chown everything in the container owned by the default root mapped user (100000).

    These are the commands I use for this:

    find /var/lib/lxc/xxx/rootfs -user 100000 -type f -exec chown username {} +;
    find /var/lib/lxc/xxx/rootfs -user 100000 -type d -exec chown username {} +;
    find /var/lib/lxc/xxx/rootfs -user 100000 -type l -exec chown -h username {} +;
    find /var/lib/lxc/xxx/rootfs -group 100000 -type f -exec chown :username {} +;
    find /var/lib/lxc/xxx/rootfs -group 100000 -type d -exec chown :username {} +;
    find /var/lib/lxc/xxx/rootfs -group 100000 -type l -exec chown -h :username {} +
    

    (Replace xxx with the LXC number and username with the host user/UID)

    If group permissions are involved you’ll also have to map those groups in the LXC config, create them in the LXC with the corresponding GIDs, add them as supplementary groups to the root user in the LXC, and then add them to the docker compose yaml using group_add.

    It’s super confusing and annoying but this is the workflow I’m using now to avoid having to have any resources tied up in VMs unnecessarily.






  • IIRC from running into this same issue, this won’t work the way you have the volume bind mounts set up because it will treat the movies and downloads directories as two separate file systems, which hardlinks don’t work across.

    If you bind mounted /media/HDD1:/media/HDD1 it should work, but then the container will have access to the entire drive. You might be able to get around that by running the container as a different user and only giving that user access to those two directories, but docker is also really inconsistent about that in my experience.



  • I had done a few easier Linux installs on Raspberry Pis and VMs in the past, but when I decided I wanted to try using Linux as my daily driver on my desktop (dual-booted with Windows at the time) I decided to go with a manual Arch install using a guide and I would 100% recommend it if you’re trying to pick up Linux knowledge. It’s really not a difficult process to just follow step-by-step, but I looked up each command as they came up in the guide so I could try to understand what I was doing and why.

    I don’t know what packages archinstall includes because I’ve never used it, but really the biggest thing for me learning was booting into a barebones Arch install. Looking into the different options for components and getting everything I needed setup and configured how I wanted was invaluable.

    That being said, now that I know how, is that how I would choose to install it? Nah, I use the CachyOS installer now, but if I wanted stock Arch I’d probably use archinstall.