meta data for this page
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revisionLast revisionBoth sides next revision | ||
vm:proxmox:lxc [2020/05/02 20:52] – created niziak | vm:proxmox:lxc [2021/01/29 07:30] – niziak | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== LXC ====== | ====== LXC ====== | ||
- | ===== docker inside unprivileged LXC ===== | + | ===== update CT templates |
- | + | ||
- | Docker is recommended to be used inside VM. | + | |
- | + | ||
- | From documentation: | + | |
- | + | ||
- | * edit LXC container config | + | |
- | <file | / | + | |
- | features: | + | |
- | </ | + | |
- | * stop/start LXC container | + | |
- | * <code bash> | + | |
- | + | ||
- | ==== issue ==== | + | |
<code bash> | <code bash> | ||
- | docker info | + | # pveam - Proxmox VE Appliance Manager |
- | ... | + | pveam update |
- | | + | |
- | | + | |
- | ... | + | |
</ | </ | ||
- | When restarted in privileged container: | ||
- | <code bash> | ||
- | docker info | ||
- | ... | ||
- | | ||
- | Root Dir: / | ||
- | Backing Filesystem: zfs | ||
- | Dirs: 0 | ||
- | Dirperm1 Supported: true | ||
- | ... | ||
- | </ | ||
- | Solution: | + | ===== Shrink container disc ===== |
- | <code bash> | + | |
- | cp / | + | |
- | </ | + | |
- | + | ||
- | Edit new file and update '' | + | |
- | + | ||
- | < | + | |
- | # Do not load this file. Rather, load / | + | |
- | # will source all profiles under / | + | |
- | + | ||
- | profile lxc-container-default-with-nesting-docker flags=(attach_disconnected, | + | |
- | #include < | + | |
- | #include < | + | |
- | + | ||
- | deny / | + | |
- | deny / | + | |
- | mount fstype=proc -> / | + | |
- | mount fstype=sysfs -> / | + | |
- | mount options=(rw, | + | |
- | mount fstype=cgroup -> / | + | |
- | mount fstype=cgroup2 -> / | + | |
- | mount fstype=aufs, | + | |
- | mount fstype=overlay, | + | |
- | } | + | |
- | </ | + | |
- | <code bash>systemctl reload apparmor</ | + | It is not supported. Command |
- | Edit '' | + | Workaround 1: |
- | <file | / | + | * Stop container |
- | lxc.apparmor.profile: | + | * Edit '' |
- | < | + | * Perform backup |
+ | * Restore LXC from backup | ||
+ | Workaround 2: | ||
+ | * Change ZFS volume size <code bash>zfs set refquota=8G rpool/ | ||
+ | * Adjust LXC config: | ||
+ | * Edit ''< | ||
+ | * '' | ||