2019-02-28 17:07:24 +00:00
|
|
|
% toolbox-create(1)
|
|
|
|
|
|
|
|
## NAME
|
|
|
|
toolbox\-create - Create a new toolbox container
|
|
|
|
|
|
|
|
## SYNOPSIS
|
2021-01-22 17:18:14 +00:00
|
|
|
**toolbox create** [*--distro DISTRO* | *-d DISTRO*]
|
2019-03-08 07:17:11 +00:00
|
|
|
[*--image NAME* | *-i NAME*]
|
|
|
|
[*--release RELEASE* | *-r RELEASE*]
|
2021-01-22 17:18:14 +00:00
|
|
|
[*CONTAINER*]
|
2019-02-28 17:07:24 +00:00
|
|
|
|
|
|
|
## DESCRIPTION
|
|
|
|
|
|
|
|
Creates a new toolbox container. You can then use the `toolbox enter` command
|
|
|
|
to interact with the container at any point.
|
|
|
|
|
2021-01-25 16:49:11 +00:00
|
|
|
A toolbox container is an OCI container created from an OCI image. On Fedora,
|
|
|
|
the default image is known as `fedora-toolbox:N`, where N is the release of
|
|
|
|
the host. If the image is not present locally, then it is pulled from a
|
|
|
|
well-known registry like `registry.fedoraproject.org`. The container is
|
|
|
|
created with `podman create`, and its entry point is set to `toolbox
|
|
|
|
init-container`.
|
2019-02-28 17:07:24 +00:00
|
|
|
|
2021-01-22 17:18:14 +00:00
|
|
|
By default, toolbox containers are named after their corresponding images. If
|
|
|
|
the image had a tag, then the tag is included in the name of the container,
|
|
|
|
but it's separated by a hyphen, not a colon. A different name can be assigned
|
|
|
|
by using the CONTAINER argument.
|
2021-01-22 16:15:23 +00:00
|
|
|
|
|
|
|
### Entry Point
|
|
|
|
|
|
|
|
A key feature of toolbox containers is their entry point, the `toolbox
|
|
|
|
init-container` command.
|
|
|
|
|
|
|
|
OCI containers are inherently immutable. Configuration options passed through
|
|
|
|
`podman create` are baked into the definition of the OCI container, and can't
|
|
|
|
be changed later. This means that changes and improvements made in newer
|
|
|
|
versions of Toolbox can't be applied to pre-existing toolbox containers
|
|
|
|
created by older versions of Toolbox. This is avoided by using the entry point
|
|
|
|
to configure the container at runtime.
|
|
|
|
|
|
|
|
The entry point of a toolbox container customizes the container to fit the
|
|
|
|
current user by ensuring that it has a user that matches the one on the host.
|
|
|
|
It ensures that configuration files, such as `/etc/host.conf`, `/etc/hosts`,
|
|
|
|
`/etc/localtime`, `/etc/resolv.conf` and `/etc/timezone`, inside the container
|
|
|
|
are kept synchronized with the host. The entry point also bind mounts various
|
|
|
|
subsets of the host's filesystem hierarchy to their corresponding locations
|
|
|
|
inside the container to provide seamless integration with the host. This
|
|
|
|
includes `/run/libvirt`, `/run/systemd/journal`, `/run/udev/data`,
|
|
|
|
`/var/lib/libvirt`, `/var/lib/systemd/coredump`, `/var/log/journal` and others.
|
|
|
|
|
|
|
|
On some host operating systems, important paths like `/home`, `/media` or
|
|
|
|
`/mnt` are symbolic links to other locations. The entry point ensures that
|
|
|
|
paths inside the container match those on the host, to avoid needless
|
|
|
|
confusion.
|
2019-02-28 17:07:24 +00:00
|
|
|
|
|
|
|
## OPTIONS ##
|
|
|
|
|
|
|
|
The following options are understood:
|
|
|
|
|
2021-01-07 20:35:20 +00:00
|
|
|
**--distro** DISTRO, **-d** DISTRO
|
|
|
|
|
|
|
|
Create a toolbox container for a different operating system DISTRO than the
|
|
|
|
host. Cannot be used with `--image`.
|
|
|
|
|
2019-03-08 07:17:11 +00:00
|
|
|
**--image** NAME, **-i** NAME
|
2019-02-28 17:07:24 +00:00
|
|
|
|
|
|
|
Change the NAME of the base image used to create the toolbox container. This
|
2021-01-06 20:25:30 +00:00
|
|
|
is useful for creating containers from custom-built base images. Cannot be used
|
|
|
|
used with `--release`.
|
2019-02-28 17:07:24 +00:00
|
|
|
|
2019-03-08 07:17:11 +00:00
|
|
|
**--release** RELEASE, **-r** RELEASE
|
2019-02-28 17:07:24 +00:00
|
|
|
|
|
|
|
Create a toolbox container for a different operating system RELEASE than the
|
2021-01-06 20:25:30 +00:00
|
|
|
host. Cannot be used with `--image`.
|
2019-02-28 17:07:24 +00:00
|
|
|
|
|
|
|
## EXAMPLES
|
|
|
|
|
|
|
|
### Create a toolbox container using the default image matching the host OS
|
|
|
|
|
|
|
|
```
|
|
|
|
$ toolbox create
|
|
|
|
```
|
|
|
|
|
|
|
|
### Create a toolbox container using the default image for Fedora 30
|
|
|
|
|
|
|
|
```
|
2021-01-07 20:35:20 +00:00
|
|
|
$ toolbox create --distro fedora --release f30
|
2019-02-28 17:07:24 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
### Create a custom toolbox container from a custom image
|
|
|
|
|
|
|
|
```
|
2021-01-22 17:18:14 +00:00
|
|
|
$ toolbox create --image bar foo
|
2019-02-28 17:07:24 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
## SEE ALSO
|
|
|
|
|
|
|
|
`buildah(1)`, `podman(1)`
|