Clone this repo:
  1. 2a72ddb Merge pull request #62 from mike-nguyen/master by Yu Qi (Jerry) Zhang · 4 months ago master 0.0.7
  2. 1e50d9d rhcos-toolbox: use interactive flag for exec by Michael Nguyen · 4 months ago
  3. 5a91d33 Merge pull request #61 from ashcrow/RHBZ1792423 by Stephen Milner · 4 months ago 0.0.6
  4. 4801efb rhcos-toolbox: Pass env to sudo when required by Steve Milner · 4 months ago
  5. b623dc3 Merge pull request #58 from ashcrow/RHBZ-1728062 by Colin Walters · 11 months ago 0.0.5

toolbox - bring your tools with you

toolbox is a small script that launches a container to let you bring in your favorite debugging or admin tools.

There are currently two scripts that live within this repository:

  • toolbox: designed for Container Linux, uses rkt and systemd-nspawn
  • rhcos-toolbox: designed for Red Hat CoreOS, uses podman


$ /usr/bin/toolbox
Spawning container core-fedora-latest on /var/lib/toolbox/core-fedora-latest.
Press ^] three times within 1s to kill container.
[root@localhost ~]# dnf -y install tcpdump
[root@localhost ~]# tcpdump -i ens3
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on ens3, link-type EN10MB (Ethernet), capture size 65535 bytes

Advanced Usage

Use a custom image

toolbox uses a Fedora-based userspace environment by default, but this can be changed to any Docker image. Simply override environment variables in $HOME/.toolboxrc:


core@core-01 ~ $ cat ~/.toolboxrc
core@core-01 ~ $ toolbox
Spawning container core-ubuntu-debootstrap-14.04 on /var/lib/toolbox/core-ubuntu-debootstrap-14.04.
Press ^] three times within 1s to kill container.
root@core-01:~# apt-get update && apt-get install tcpdump


core@core-01 ~ $ cat ~/.toolboxrc
core@core-01 ~ $ toolbox
Spawning a container 'toolbox-test' with image ''

Automatically enter toolbox on login

Set an /etc/passwd entry for one of the users to /usr/bin/toolbox:

useradd bob -m -p '*' -s /usr/bin/toolbox -U -G sudo,docker,rkt

Now when SSHing into the system as that user, toolbox will automatically be started:

$ ssh
Container Linux by CoreOS alpha (1284.0.0)
Spawning container bob-fedora-latest on /var/lib/toolbox/bob-fedora-latest.
Press ^] three times within 1s to kill container.
[root@localhost ~]# dnf -y install emacs-nox
[root@localhost ~]# emacs /media/root/etc/systemd/system/docker.service


Please use the CoreOS issue tracker to report all bugs, issues, and feature requests.