2019-03-08 06:42:29 +00:00
|
|
|
% toolbox-run(1)
|
|
|
|
|
|
|
|
## NAME
|
|
|
|
toolbox\-run - Run a command in an existing toolbox container
|
|
|
|
|
|
|
|
## SYNOPSIS
|
|
|
|
**toolbox run** [*--container NAME* | *-c NAME*]
|
2021-01-07 20:35:20 +00:00
|
|
|
[*--distro DISTRO* | *-d DISTRO*]
|
2019-03-08 06:42:29 +00:00
|
|
|
[*--release RELEASE* | *-r RELEASE*] [*COMMAND*]
|
|
|
|
|
|
|
|
## DESCRIPTION
|
|
|
|
|
|
|
|
Runs a command inside an existing toolbox container. The container should have
|
|
|
|
been created using the `toolbox create` command.
|
|
|
|
|
2021-03-04 19:36:22 +00:00
|
|
|
`toolbox run` wraps around `podman exec` and by default passes several options
|
|
|
|
to it. It allocates a tty, connects to stdin, runs the passed command as the
|
|
|
|
current user in the current directory and shares common environmental
|
|
|
|
variables.
|
|
|
|
|
|
|
|
The executed command is wrapped in `capsh` that gets rid of all extra
|
|
|
|
capabilities that could negatively affect the experience.
|
|
|
|
|
2019-03-08 06:42:29 +00:00
|
|
|
A toolbox container is an OCI container. Therefore, `toolbox run` is analogous
|
|
|
|
to a `podman start` followed by a `podman exec`.
|
|
|
|
|
|
|
|
## OPTIONS ##
|
|
|
|
|
|
|
|
The following options are understood:
|
|
|
|
|
|
|
|
**--container** NAME, **-c** NAME
|
|
|
|
|
2019-05-14 15:25:20 +00:00
|
|
|
Run command inside a toolbox container with the given NAME. This is useful
|
|
|
|
when there are multiple toolbox containers created from the same base image,
|
|
|
|
or entirely customized containers created from custom-built base images.
|
2019-03-08 06:42:29 +00:00
|
|
|
|
2021-01-07 20:35:20 +00:00
|
|
|
**--distro** DISTRO, **-d** DISTRO
|
|
|
|
|
|
|
|
Run command inside a toolbox container for a different operating system DISTRO
|
|
|
|
than the host.
|
|
|
|
|
2019-03-08 06:42:29 +00:00
|
|
|
**--release** RELEASE, **-r** RELEASE
|
|
|
|
|
2019-05-14 15:25:20 +00:00
|
|
|
Run command inside a toolbox container for a different operating system
|
|
|
|
RELEASE than the host.
|
2019-03-08 06:42:29 +00:00
|
|
|
|
|
|
|
## EXAMPLES
|
|
|
|
|
|
|
|
### Run ls inside a toolbox container using the default image matching the host OS
|
|
|
|
|
|
|
|
```
|
|
|
|
$ toolbox run ls -la
|
|
|
|
```
|
|
|
|
|
|
|
|
### Run emacs inside a toolbox container using the default image for Fedora 30
|
|
|
|
|
|
|
|
```
|
2021-01-07 20:35:20 +00:00
|
|
|
$ toolbox run --distro fedora --release f30 emacs
|
2019-03-08 06:42:29 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
### Run uptime inside a custom toolbox container using a custom image
|
|
|
|
|
|
|
|
```
|
|
|
|
$ toolbox run --container foo uptime
|
|
|
|
```
|
|
|
|
|
|
|
|
## SEE ALSO
|
|
|
|
|
2021-03-04 19:36:22 +00:00
|
|
|
`toolbox(1)`, `podman(1)`, `podman-exec(1)`, `podman-start(1)`, `capsh(1)`,
|
|
|
|
`sh(1)`
|