This a fork of https://gitlab.com/uppercat/tlbx repo. It was meant to store my personal setting until they are merged by the upstream but the upstream does not seems to inactive. Just to be sure to If I make important changes I will also make a merge request to upstream.
tlbx is a tool that facilitates creating and using mutable, persistent Linux container environments. Because it is a wrapper for podman, using it does not require root privilege.
tlbx is inspired by containers/toolbox, but differs in that tlbx does not require a specially prepared container image. (Similarites to coreos/rhcos-toolbox are also apparent.) tlbx can work with any OCI image, including CentOS and Ubuntu.
tlbx is valuable for use cases such as:
-
Systems on which installing applications is difficult or discouraged, such as Fedora Silverblue.
-
Systems on which you do not have the administrative ability to install applications.
-
Setting up a development environment which you intend to back up or deploy to other systems. If you don’t know all the applications that will be required a priori, you can set up a tlbx as an ongoing work in progress. When it needs to move,
podman commit
the container andskopeo copy
the resulting image. -
Quickly accessing packages that aren’t readily available from your distro’s default repositories, but which are available from a fast-moving or less restrictive distro such as Arch Linux.
-
Any situation in which you don’t want to run the package manager as root, such as using an app you might not trust. In such a case you may also consider the
-n
option totlbx create
.
Copy to a directory in PATH
, such as ~/.local/bin
. Podman is the only requirement. Currently there are no distro packages available for tlbx itself.
tlbx create [-i IMGNAME] [-c CONTAINERNAME] [-h HOSTNAME] [-n]
Example: tlbx create -i centos:8 -c centosbox
The default image is Docker’s official Alpine Linux. The default container name is -tlbx
appended to the image name, excluding the image tag. The default hostname is tlbx
.
Your home directory is bind-mounted to the container unless the -n
switch is passed.
tlbx enter [PODMAN_EXEC_OPTS…] CONTAINERNAME [CMD [ARGS…]]
If zero arguments are given after the container name, then the -i
and -t
podman options are implied, and the user’s shell as specified in the container’s /etc/passwd
is run as a login shell.
Otherwise, any arguments passed after the container name will be the entry command; In that case, -i
and/or -t
must be passed before the container name if wanted.
Example: tlbx enter centosbox
results in an interactive bash -l
Example: tlbx enter centosbox bash
exits immediately due to no tty being requested for the shell
Example: tlbx enter --user=root -it centosbox dnf install ruby
runs a single interactive package installation
A tlbx container can be entered concurrently from multiple ttys, and the entry command doesn’t have to be a shell, or interactive.
tlbx list
The list subcommand shows the subset of podman containers that are labeled with com.gitlab.uppercat.tlbx
. This label is applied automatically by tlbx create
.
See the wiki.