Lilipod aims to be a very simple (as in few features) container and image manager.
Lilipod?
Sounds like little-pod, and I like it.
So what does this manage?
Lilipod is a very simple container manager with minimal features to:
Download and manager images
Create and run containers
It tries to keep a somewhat compatible CLI interface with Podman/Docker/Nerdctl
~$ lilipod help
Manage containers and images
Usage:
lilipod [command]
Available Commands:
completion Generate the autocompletion script for the specified shell
cp Copy files/folders between a container and the local filesystem
create Create but do not start a container
exec Exec but do not start a container
help Help about any command
images List images in local storage
inspect Inspect a container or image
logs Fetch the logs of one or more
ps List containers
pull Pull an image from a registry
rename Rename a container
rm Remove one or more containers
rmi Removes one or more images from local storage
run Run but do not start a container
start Start one or more containers
stop Remove one or more containers
update Update but do not start a container
version Show lilipod version
Flags:
-h, --help help for lilipod
--log-level string log messages above specified level (debug, warn, warning, error)
-v, --version version for lilipod
Use "lilipod [command] --help" for more information about a command.
Warning
This is beta quality software, it's not heavily used and tested like other alternatives. Be aware.
So are these containers like in Podman or Docker right?
Well...superficially yes; Sure you have a separate user, mount (and optionally network, pid, ipc) namespaces, and the processes are in a pivotroot jail, but this does not manage anything else, so:
no seccomp
no capabilities
no cgroups
If you need full blown containers, look no further than Podman or Nerdctl for your needs.
Goals
Lilipod wants to be:
nimble
single statically compiled binary
no external dependencies (as much as possible...more on this later)
Follow Podman command and flags name when possible, try also to match the output
This tool does not aim to be a full replacement for Podman, Docker, Nerdctl or similar tools
Ok but why was it created?
Well, I felt the need to go deeper in how to download a container image from a registry... then one thing lead to another... and here we are. π
Also this is a nice fallback for Distrobox when no container-manager is found, or when it's not possible to install one.
Being a fully self-contained binary that lives in one directory (LILIPOD_HOME) it makes it easy to install and remove without package managers.
Getting started
Install
Download the binary from the release page, and use it.
Compile
make
This will create a statically compiled binary.
Dependencies
By itself Lilipod depends only on some Linux utilities (nsenter, tar, cp, ps etc etc), those will be sourced from a bundled busybox static binary. This ensures working dependencies even on atypical systems.
But be aware that to work in a rootless manner, you need to have a working installation of the uidmap package.
Citing their README:
subuid
newuidmap and newgidmap need to be installed on the host. These commands are provided by the uidmap package on most distributions.
/etc/subuid and /etc/subgid should contain more than 65536 sub-IDs. e.g. penguin:231072:65536. These files are automatically configured on most distributions.
~$ lilipod
Manage containers and images
Usage:
lilipod [command]
Available Commands:
completion Generate the autocompletion script for the specified shell
cp Copy files/folders between a container and the local filesystem
create Create but do not start a container
exec Exec but do not start a container
help Help about any command
images List images in local storage
inspect Inspect a container or image
logs Fetch the logs of one or more
ps List containers
pull Pull an image from a registry
rename Rename a container
rm Remove one or more containers
rmi Removes one or more images from local storage
run Run but do not start a container
start Start one or more containers
stop Remove one or more containers
update Update but do not start a container
version Show lilipod version
Flags:
-h, --help help for lilipod
--log-level string log messages above specified level (debug, warn, warning, error)
-v, --version version for lilipod
Use "lilipod [command] --help" for more information about a command.
Doing like 1/20th of what Podman or Nerdctl do, at least it tries to be fast...
There are some basic entering speed for an execution:
:~$ time (for i in {1..20}; do podman exec -ti --user luca-linux fedora-rawhide whoami >/dev/null 2>/dev/null; done)
real 0m4.690s
user 0m2.178s
sys 0m0.829s
:~$ time (for i in {1..20}; do ./lilipod exec -i --user luca-linux fedora-rawhide whoami >/dev/null 2>/dev/null; done)
real 0m0.741s
user 0m0.458s
sys 0m0.450s
:~$ time (for i in {1..20}; do podman run --rm -ti alpine:latest whoami >/dev/null 2>/dev/null; done)
real 0m10.125s
user 0m2.606s
sys 0m1.744s
:~$ time (for i in {1..20}; do ./lilipod run --rm -ti alpine:latest whoami >/dev/null 2>/dev/null; done)
real 0m6.157s
user 0m3.545s
sys 0m2.613s
It takes about 5~8ms to enter a container and execute stuff
This obviously is a completely useless and arbitrary metric compared to the difference of utility of the two tools.
Configuration
You can set LILIPOD_HOME to force lilipod to create images/containers/volumes in a specific directory.
Else lilipod will use XDG_DATA_HOME or fallback to $HOME/.local/share/lilipod
Limitations
by nature this tool does not use stuff like overlayfs so there is no deduplication between container's rootfs, but image layer deduplication is present
There is no custom networking, you either share host's network or you're offline