https://github.com/afbjorklund/systemd-toolbox
github.com/coreos/toolbox
https://github.com/afbjorklund/systemd-toolbox
crane systemd toolbox
Last synced: 7 months ago
JSON representation
github.com/coreos/toolbox
- Host: GitHub
- URL: https://github.com/afbjorklund/systemd-toolbox
- Owner: afbjorklund
- License: apache-2.0
- Created: 2025-01-10T11:45:02.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2025-01-10T17:52:01.000Z (9 months ago)
- Last Synced: 2025-03-10T22:33:06.733Z (7 months ago)
- Topics: crane, systemd, toolbox
- Language: Shell
- Homepage:
- Size: 21.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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.
## Usage
```
$ /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
TOOLBOX_DOCKER_IMAGE=ubuntu-debootstrap
TOOLBOX_DOCKER_TAG=14.04
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
```### Automatically enter toolbox on login
Set an `/etc/passwd` entry for one of the users to `/usr/bin/toolbox`:
```sh
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 bob@hostname.example.com
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
```