linux:containers:lxc
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
linux:containers:lxc [11/07/2025 11:25] – [Creating a new container] andrew | linux:containers:lxc [23/07/2025 14:38] (current) – andrew | ||
---|---|---|---|
Line 4: | Line 4: | ||
===== Installation ===== | ===== Installation ===== | ||
- | Standard install of Ubuntu | + | Standard install of Ubuntu |
==== Disk layout ==== | ==== Disk layout ==== | ||
Line 38: | Line 38: | ||
==== Creating a new container ==== | ==== Creating a new container ==== | ||
- | lxc-create: | + | '' |
- | -n --name, Name of the container\\ | + | '' |
- | -t --template, Template to use to set up container\\ | + | '' |
Line 204: | Line 204: | ||
</ | </ | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | ==== Create Unprivileged Containers as Root with Shared UID and GID Ranges ==== | ||
+ | |||
+ | |||
+ | Creating system-wide unprivileged containers (that is, unprivileged containers created and started by root) requires only a few extra steps to organize subordinate user IDs (uid) and subordinate group IDs (gid). | ||
+ | |||
+ | Specifically, | ||
+ | |||
+ | For example, if you have not done anything on your host related to subordinate uid and gid ranges, the following commands may be all you need. Before doing the following, take a look in /etc/subuid and /etc/subgid to see that the range 100000: | ||
+ | |||
+ | echo " | ||
+ | echo " | ||
+ | echo " | ||
+ | echo " | ||
+ | |||
+ | That's it! Any container you create as root from now on will be running unprivileged. | ||
+ | |||
===== Networking ===== | ===== Networking ===== | ||
Line 229: | Line 249: | ||
''/ | ''/ | ||
+ | |||
+ | Or.... | ||
+ | |||
+ | ''/ | ||
+ | |||
Specific configs are kept in / | Specific configs are kept in / |
linux/containers/lxc.1752233158.txt.gz · Last modified: by andrew