containers / containers/toolbox

Add a --workdir option to 'run'

Open
#1,675 0 comments 1 reaction 1 assignee Claimed by @DaliborKr View on GitHub
1. Feature request
Dominant language
Go
Stars
3.5k
Forks
262
Avg merge
3d 1h
Merged PRs (30d)
1

Description

[Ptyxis](https://gitlab.gnome.org/chergert/ptyxis) currently enters a Toolbx container in a new terminal by directly using Podman's `start` and `exec` commands. We need to work out a way to make it use `toolbox(1)` because Toolbx's `enter` and `run` commands have become more than just those Podman commands and some recent Toolbx features might not work without going through `toolbox(1)`.

I think the `run` command is more appropriate for terminal emulation applications like Ptyxis because it already [supports](https://github.com/containers/toolbox/issues/1066) `--preserve-fds`, which is something these apps need.

Ptyxis needs a way to explicitly mention the working directory when entering a Toolbx container in a new terminal to ensure that the directory is preserved. This is because the Ptyxis process that creates a new pseudoterminal and will spawn `toolbox(1)` against it, has a different current working directory than the one in the user's previous terminal. Therefore, `toolbox(1)` cannot automatically find out what the working directory should be.

One way to address this would be to mirror the `--workdir` option of `podman exec` in `toolbox run`.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.