And a few other tools for building LXC containers by hand.
.deb into a debian|ubuntu server that will host LXC containers. This will install the tools to
/bin but will not modify the boot of the host server.
Then create lxinitd based containerized instances with...
lxc-create -t lxinitd -n mycontainerThis will copy
/sbin/initand minimal tools from the host to the container. This gives you a Linux instance with
/libmanaged by the distribution (ubuntu|debian) and without systemd.
The resulting container has paractically no tools; not even
ps, and specifically does not have
bash or any interactive shell or
You can then add just the tools you wish by copying them to the rootfs in
This makes it easy to create "full OS" containers that have as little or less attack suface than an Dockerized app.
A base lxinitd container with lxinitd tools,
/sbin/getty wieghs in at...
root@mybox:/var/lib/lxc/lxinitd/rootfs# du -sh . 568K .
More details in the manual
rosh(a read only shell) that can exectue commands but has no built-in features to write to the file system. There is no way to redirect output to a file. This enables scripting the boot of servers without adding a full shell into the container. If you need to, say, touch a file, you can copy
/var/lib/lxc/mycontainer/rootfs/bin, there is not too much damage you can do with touch.
Ubuntu|Debian installers are published here download .deb files
sudo add-apt-repository ppa:teknopaul/lxinitd sudo apt-get update sudo apt-get install lxinitd
Add the following to your
/etc/apt/sources.list to use this repository.
deb http://download.tp23.org/download/deb/ ./And run this to import the key
wget -q http://download.tp23.org/download/deb/public.gpg -O - | sudo apt-key add -