Commit graph

16 commits

Author SHA1 Message Date
Nils Lindemann
05191026c9 doc/toolbox-enter, doc/toolbox-run: Fix the default container examples
The phrase 'using a custom image' is awkward because it makes it sound
as if the image plays an important role in 'enter' and 'run'.  That's
not true.

Also, titles are sweeter when they are shorter.

https://github.com/containers/toolbox/pull/1281

Signed-off-by: Nils Lindemann <nilslindemann@tutanota.com>
2023-03-30 21:48:30 +02:00
Nils Lindemann
cceea52af6 doc/toolbox-enter, doc/toolbox-run: Fix the custom container examples
When a specific Toolbx container is selected by name for 'enter' and
'run', it's not necessary that the container was created using a custom
image.  The container could have also been created using one of the
built-in images.

Secondly, the phrase 'using a custom image' is awkward because it makes
it sound as if the image plays an important role in 'enter' and 'run'.
That's not true.

Finally, titles are sweeter when they are shorter.

https://github.com/containers/toolbox/pull/1281

Signed-off-by: Nils Lindemann <nilslindemann@tutanota.com>
2023-03-30 21:40:03 +02:00
Debarshi Ray
2a5f20e1b4 doc/toolbox, doc/toolbox-run: Refer to a newer Fedora release
Fedora 35 reached End of Life on 13th December 2022:
https://docs.fedoraproject.org/en-US/releases/eol/

https://github.com/containers/toolbox/pull/1237
2023-02-10 22:00:16 +01:00
Debarshi Ray
936a157117 doc, test/system: Fix the titles of the manuals
Currently, the titles of the manuals are rendered with a pair of empty
parentheses and no section title:
  toolbox(1)()                                              toolbox(1)()

  NAME
         toolbox - Tool for containerized command line environments...

However, they should be:
  toolbox(1)             General Commands Manual              toolbox(1)

  NAME
         toolbox - Tool for containerized command line environments...

This is because the troff generated by go-md2man from Markdown has a
faulty invocation of the .TH macro [1]:
  .nh
  .TH toolbox(1)
  .SH NAME
  .PP
  toolbox - Tool for containerized command line environments on Linux

It should be:
  .nh
  .TH toolbox 1
  .SH NAME
  .PP
  toolbox - Tool for containerized command line environments on Linux

Original patch from Andrew Denton for Podman [2].

[1] https://www.gnu.org/software/groff/manual/groff.html

[2] Podman commit 63c779a857b55b00
    https://github.com/containers/podman/pull/15621

https://github.com/containers/toolbox/pull/1210
2023-01-12 18:45:00 +01:00
Allison Karlitskaya
d4213c2358 Support leaking additional file descriptors to the container
This mirrors the --preserve-fds option of Podman.

Converting an unsigned 'uint', which is what Podman uses for its
--preserve-fds option, to a string is surprisingly annoying.
strconv.Itoa [1] takes a signed 'int', which would require a cast, and
there's no unsigned counterpart.  There's strconv.FormatUint [2] which
takes an unsigned 'uint64', which is better, but would still require a
cast.

So, fmt.Sprint [3] it is, if the cast is to be avoided.  It's more
expensive than the other two functions, but there's no need to worry
unless it's proven to be a performance bottle neck.

Some changes by Debarshi Ray.

[1] https://pkg.go.dev/strconv#Itoa

[2] https://pkg.go.dev/strconv#FormatUint

[3] https://pkg.go.dev/fmt#Sprint

https://github.com/containers/toolbox/issues/1066

Signed-off-by: Allison Karlitskaya <allison.karlitskaya@redhat.com>
2022-11-14 22:28:27 +01:00
Debarshi Ray
c0f9fcf208 doc/toolbox-run: Tweak the wording for consistency
... with the toolbox-create(1) and toolbox-enter(1) manuals.

Fallout from ffd365342e

https://github.com/containers/toolbox/pull/1143
2022-10-21 21:45:50 +02:00
Oliver Gutierrez
f8e21a31b3 cmd/run, root: Exit with exit code of invoked command
When a command is executed with toolbox run and it returns a non-zero
exit code, it is just ignored if that exit code is not handled. This
prevents users to identify errors when executing commands in toolbox.

With this fix, the exit codes of the invoked command are propagated
and returned by 'toolbox run'. This includes even exit codes returned
by Podman on error.

https://github.com/containers/toolbox/pull/1013

Co-authored-by: Ondřej Míchal <harrymichal@seznam.cz>
2022-03-21 00:05:45 +02:00
Ondřej Míchal
ffd365342e doc: Highlight that --distro has to be used with --release
...unless the selected distro matches the host system.

https://github.com/containers/toolbox/pull/977
https://github.com/containers/toolbox/pull/986
2022-01-13 22:20:43 +01:00
Debarshi Ray
20a20bf149 doc: Refer to a newer Fedora release in the examples
Fedora 30 reached End of Life on 26th May 2020:
https://docs.fedoraproject.org/en-US/releases/eol/

https://github.com/containers/toolbox/pull/953
2021-12-10 03:03:54 +01:00
Debarshi Ray
2e99b8a57f doc/toolbox-create, doc/toolbox-run: Remove references to base images
As far as Toolbox is concerned, there are no longer base images and
user-specific customized images. They are all just images.

This should have been part of commit 6543ff6a06.

https://github.com/containers/toolbox/pull/952
2021-12-10 02:49:15 +01:00
Debarshi Ray
a0457c8fdb doc/toolbox-run: Style fix
https://github.com/containers/toolbox/pull/814
2021-06-26 13:16:42 +02:00
Debarshi Ray
4391b5846c doc/toolbox-run: Skip implementation bits, keep user-visible behaviour
This reverts parts of commit ea452d7ced.

https://github.com/containers/toolbox/pull/814
2021-06-26 03:43:43 +02:00
Ondřej Míchal
ea452d7ced doc: Update to match current state & extend docs
- Update "See also" sections

Toolbox does not use Buildah for a considerable time now[0]. We can stop
referencing it in the "See also" sections of the documentation.

In some places mention podman command man pages where they are relevant.

- Add section about toolbox images/containers

Toolbox only supports certain OCI images. These should be documented.
Also, document the change of fedora-toolbox image name.

- Add a section about toolbox container setup

Toolbox containers are specifically configured OCI containers. This
should be documented so that users know what they're using.

- Remove redundant part documentation

The description of what `toolbox init-container` does is already in
toolbox-init-container(1). There's no need to have it in
toolbox-create(1). Instead, replace the text with a hint to visit the
other part of documentation.

- Clarify behaviour of --image option

The fact that Toolbox by default tries to pull from the Fedora
registry[1] should be noted.

- Update synopsis & description of commands

Mention options passed to `podman exec`. Remove redundant paragraph
about container names (is already dealt with in toolbox-create(1)).

There's no need to mention the name of the default container on Fedora
since Toolbox now also supports RHEL.

Mention the default used image on unrecognised systems.

Emphasize the fact that toolboxes are not a fully sandboxed environment.

Update the wording of the description and splits it into a few
subsections.

The description of the --monitor-host was inaccurate and while the
option will go away in the future[2], it is currently in and should be
more documented.

[0] https://github.com/containers/toolbox/pull/160
[1] https://registry.fedoraproject.org
[2] https://github.com/containers/toolbox/pull/617

https://github.com/containers/toolbox/pull/512
2021-05-24 17:15:50 +02:00
Ondřej Míchal
32d711cc64 Add a --distro option
This is meant to allow the user to create toolbox containers of
operating system distributions that are different from that of the
host and isn't Fedora.

https://github.com/containers/toolbox/pull/667
2021-01-12 02:37:47 +01:00
Debarshi Ray
aa0e6222ff doc/toolbox-run: Style fixes 2019-05-14 17:26:02 +02:00
Toni Schmidbauer
2da4cc4634 Add a run command
This makes 'toolbox enter' similar to 'toolbox run $SHELL'.

The 'run' command is meant to spawn arbitrary binaries present inside
the toolbox container. Therefore it doesn't make sense for it to fall
back to /bin/bash, like it does for 'enter' if $SHELL is absent.

It's expected that users might use 'run' to create ad-hoc *.desktop
files. That's why it neither offers to create nor falls back to an
existing container like 'enter' does, because such interactions can't
happen when used in a *.desktop file. It's also a more advanced command
that new users are less likely to be interested in. Hence, this
shouldn't affect usability.

Some changes by Debarshi Ray.

https://github.com/debarshiray/toolbox/pull/76
2019-05-06 15:23:58 +02:00