user allows you to create and remove containers and associations, as well as enter shells in containers. It also happens to have a trick up its sleeve, which allows you to reproduce your system easily through a simple config file (skip to section).
Here's how you can create a Debian container named 'my-first-container'.
user create-container my-first-container debian
After its creation is complete, you'll find that all of its binaries will be available on the host with the suffix
.my-first-container. For example (terminal window on the host):
- apt -> apt.my-first-container
- dpkg -> dpkg.my-first-container
- bash -> bash.my-first-container
user remove-container debian
There are multiple ways in which you can enter a container. The first one is to use
user to enter a container, as below (terminal window on the host):
user enter my-first-container
The second would be to run
bash.my-first-container in a regular shell.
You might be tired of running
apt.my-first-container all the time, in which you can shorten it to
apt by simply running the following command (terminal window on the host):
user associate apt my-first-container
You can now install a package with
sudo apt install [pkg] from a regular shell now.
user dissociate my-first-container
Writing a configuration and importing it on other systems
Here's what a sample configuration looks like:
# allowed_keys: [YOUR_SSH_PUBLIC_KEY_HERE]
# Containers go here
- 'echo "info: commands provided as strings, like this one, are run with bash"'
- sudo ln -sf ../../games/cowsay /usr/bin/cowsay
- sudo ln -sf ../../games/cowthink /usr/bin/cowthink
- ['cowsay', 'commands provided in the form of a list, like this one, are executed directly inside containers']
# Associations go here
Applying a configuration
Simply save the above config to a file named
user.yaml, and run
user cadre [PATH TO FILE], where
[PATH TO FILE] is the path to
If you want to understand what the above config does, read on.
Each of modules come under the
modules section in the config, and
enabled must be set to
true for each of them, as you might have noticed in the above configuration.
authorized_keys: # list of SSH keys
style: # system-wide style, light or dark
gtk-theme: # theme to use
icon-theme: # icon theme to use
button-placement: # left or right
# the next three options support the following values: toggle-maximize | toggle-maximize-horizontally
# | toggle-maximize-vertically | minimize | none | lower | menu
Each of the containers should come under the
containers section in the config, and be in the following format:
distro: container_distro # this could be in arch | crystal-linux | ubuntu-22.04 | ubuntu-23.04 | debian | neurodebian-bookworm | kali-linux | almalinux-9 | fedora-38 | rocky-linux
- echo 'This is the first command that will be run in the container after the packages are installed.'
- ['echo', 'And this is the second command that will be run in the container after the packages are installed.']
Spot the difference between the two commands. The first one is a simple string, and is thus equivalent to:
['bash', '-c', 'echo \'This is the first command that will be run in the container after the packages are installed.\'']
The second one is in a list, and is executed directly instead of in a shell.
As with the two mentioned previously, each of the associations should come under the
associations section in the config.
Each association should be in the format: