Add LXC Docker support: sysctl settings and Proxmox config notes
This commit is contained in:
21
default.nix
21
default.nix
@@ -15,6 +15,12 @@
|
||||
# };
|
||||
# };
|
||||
# };
|
||||
#
|
||||
# IMPORTANT: For LXC containers running Docker, the Proxmox LXC must be configured with:
|
||||
# - Features: nesting=1, keyctl=1
|
||||
# - Unprivileged: no (or privileged: yes)
|
||||
# Edit the container config in Proxmox: /etc/pve/lxc/<VMID>.conf
|
||||
# Add: features: nesting=1,keyctl=1
|
||||
|
||||
{
|
||||
config,
|
||||
@@ -136,14 +142,25 @@ in
|
||||
usda-vision-app
|
||||
];
|
||||
|
||||
# Enable Docker service
|
||||
# Enable Docker service with LXC-compatible settings
|
||||
virtualisation.docker = {
|
||||
enable = true;
|
||||
autoPrune.enable = true;
|
||||
# Enable experimental features for better LXC compatibility
|
||||
daemon.settings = {
|
||||
experimental = true;
|
||||
};
|
||||
};
|
||||
|
||||
# LXC-specific settings for nested containers
|
||||
boot.kernel.sysctl = {
|
||||
# Required for Docker networking in LXC
|
||||
"net.ipv4.ip_forward" = 1;
|
||||
"net.ipv4.conf.all.forwarding" = 1;
|
||||
};
|
||||
|
||||
# Configure users
|
||||
athenix.users.sv22900.enable = true;
|
||||
athenix.users.hdh20267.enable = true;
|
||||
|
||||
# Add users to docker group
|
||||
users.users.sv22900.extraGroups = [ "docker" ];
|
||||
|
||||
Reference in New Issue
Block a user