Skip to content

yilkalargaw/tlbx

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

57 Commits
 
 
 
 
 
 

Repository files navigation

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.

Why

tlbx is valuable for use cases such as:

  1. Systems on which installing applications is difficult or discouraged, such as Fedora Silverblue.

  2. Systems on which you do not have the administrative ability to install applications.

  3. 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 and skopeo copy the resulting image.

  4. 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.

  5. 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 to tlbx create.

Installing

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.

Usage

create

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.

enter

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.

list

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.

rm

tlbx rm [-f] CONTAINERNAME [CONTAINERNAME…​]

Example: tlbx rm centosbox

If the container is running (because it has been entered), the -f switch is required. tlbx rm can only affect containers created with tlbx create, because it filters for the com.gitlab.uppercat.tlbx label.

Troubleshooting

See the wiki.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages