LinuxCommandLibrary

toolbox-enter

Enter a containerized development environment

TLDR

Enter a toolbox container using the default image of a specific distribution

$ toolbox enter [[-d|--distro]] [distribution]
copy

Enter a toolbox container using the default image of a specific release of the current distribution
$ toolbox enter [[-r|--release]] [release]
copy

Enter a toolbox container using the default image for Fedora 39
$ toolbox enter [[-d|--distro]] [fedora] [[-r|--release]] [f39]
copy

SYNOPSIS

toolbox enter [CONTAINER_NAME] [OPTIONS]
toolbox enter --container NAME [OPTIONS]

PARAMETERS

CONTAINER_NAME
    The name of the container to enter. If omitted, toolbox will try to enter a default container, typically 'fedora-toolbox-VERSION'.

--container NAME, -c NAME
    Explicitly specify the name of the container to enter. This is an alternative to the positional argument.

--distro NAME
    When implicitly creating a new default toolbox on the fly, this specifies the distribution for the new toolbox (e.g., 'fedora', 'debian').

--release NAME
    When implicitly creating a new default toolbox, specifies the release version of the distribution (e.g., '38' for Fedora).

--preserve-home
    Mount the host system's home directory into the container. This is often the default behavior for toolbox containers.

--shell SHELL
    Specify an alternative shell to execute inside the container, instead of the default shell configured for the user (e.g., '--shell /bin/zsh').

--verbose
    Display verbose output, showing more details about the operations being performed. Useful for debugging.

--version
    Print the version information of the toolbox utility and exit.

--help
    Print a help message summarizing usage and options, then exit.

DESCRIPTION

toolbox enter is a command-line utility used to enter an existing Toolbox container. A Toolbox container provides a reproducible, isolated, and consistent command-line environment for developers, built on top of OCI containers (specifically using Podman). When you enter a toolbox, you are essentially launching a shell session inside that container. This allows you to install development tools, libraries, and dependencies without cluttering your host operating system. The toolbox utility aims to bridge the gap between containerization and a traditional development workstation, making containerized environments feel like a natural extension of the host system, with shared home directories and access to host D-Bus, network, etc. It's particularly popular on Fedora CoreOS, Silverblue, and Kinoite, but can be used on any system with Podman.

CAVEATS

toolbox enter relies on Podman for container management and runc for container execution; these must be installed and properly configured on the host system.
Toolbox containers are designed for interactive development and testing, not for running long-lived services or critical production applications.
While toolbox aims for seamless integration, there might be subtle differences in environment variables or paths compared to the host system.
It is primarily developed for and best integrated with Fedora and its derivatives (e.g., Fedora Silverblue, Kinoite), though it can be installed on other Linux distributions.

SHARED ENVIRONMENT

When entering a toolbox, it often shares the user's home directory from the host, allowing seamless access to user files. It also integrates with the host's D-Bus system, enabling containerized applications to interact with graphical applications or system services on the host. Network access is also shared by default.

DEVELOPMENT FOCUS

The primary design goal of toolbox is to provide a clean and isolated environment for installing development tools, compilers, language runtimes, and libraries without polluting the host's root file system. This allows developers to experiment with different toolchains or work on projects requiring specific dependency versions without conflicts.

HISTORY

The toolbox project originated as part of Fedora's efforts to provide a more robust and flexible developer experience, especially for immutable operating systems like Fedora Silverblue. It leverages Podman (developed by Red Hat) as its backend, building upon existing container technologies to simplify the process of setting up development environments. Its development has focused on creating a user-friendly abstraction over containers, making them feel like a natural part of the desktop workflow rather than a separate virtual machine or complex Docker setup.

SEE ALSO

Copied to clipboard