Tools in the cnest package
Primary tools:
cnestfor entering persistent containerscreate-cnestfor creating persistent containers
The cnest package includes bash auto-completions for both tools.
cnest
cnest is a simple script for invoking
podman exec/start/stop with some extra niceties:
- Unlike
podman exec, you can omit the command to exec, and it will default to executing either the command/bin/bash --login. - It will stop the container if there are no more
podman execsessions (of whichcnestsessions are one case). - It will automatically keep you in your current directory if your current directory is also shared with the nest container.
- Look at the
podman execarguments in the script for the rest of the niceties.
Container requirements for cnest
The cnest script can be used with any container that:
- Will run in the background after
podman start(e.g., runssleep inf). - Has
/bin/bashavailable to execute.
A container does not have to be created with create-cnest.
create-cnest
create-cnest is for creating a container.
It's mostly just a wrapper around podman run.
A bonus feature enabled by create-cnest is adding a symbol and container name to the
prompt inside the container.
Image requirements for create-cnest
- Mandatory POSIX commands:
cp,chown,chmod,mkdir,sleep bash,useradd, andgroupadd(widely included in most distros)