mirror of
https://github.com/containers/podman.git
synced 2025-06-23 02:18:13 +08:00
Merge pull request #19932 from lsm5/podmansh-timeout
Podmansh: use podmansh_timeout
This commit is contained in:
@ -4,6 +4,7 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
_ "github.com/containers/podman/v4/cmd/podman/completion"
|
_ "github.com/containers/podman/v4/cmd/podman/completion"
|
||||||
@ -43,9 +44,7 @@ func main() {
|
|||||||
(len(os.Args[0]) > 0 && filepath.Base(os.Args[0][1:]) == registry.PodmanSh) {
|
(len(os.Args[0]) > 0 && filepath.Base(os.Args[0][1:]) == registry.PodmanSh) {
|
||||||
shell := strings.TrimPrefix(os.Args[0], "-")
|
shell := strings.TrimPrefix(os.Args[0], "-")
|
||||||
|
|
||||||
// The wait timeout will soon be made configurable via the
|
args := []string{shell, "exec", "-i", "--wait", strconv.FormatUint(uint64(registry.PodmanConfig().ContainersConfDefaultsRO.Engine.PodmanshTimeout), 10)}
|
||||||
// upcoming `podmansh_timeout` option in containers.conf
|
|
||||||
args := []string{shell, "exec", "-i", "--wait", "30"}
|
|
||||||
if term.IsTerminal(0) || term.IsTerminal(1) || term.IsTerminal(2) {
|
if term.IsTerminal(0) || term.IsTerminal(1) || term.IsTerminal(2) {
|
||||||
args = append(args, "-t")
|
args = append(args, "-t")
|
||||||
}
|
}
|
||||||
|
@ -20,6 +20,8 @@ Systemd will automatically create the container when the user session is started
|
|||||||
|
|
||||||
Administrators can use volumes to expose specific host data from the host system to the user, without the user being exposed to other parts of the system.
|
Administrators can use volumes to expose specific host data from the host system to the user, without the user being exposed to other parts of the system.
|
||||||
|
|
||||||
|
Timeout for podmansh can be set using the `podmansh_timeout` option in containers.conf.
|
||||||
|
|
||||||
## Setup
|
## Setup
|
||||||
Create user login session using useradd while running as root.
|
Create user login session using useradd while running as root.
|
||||||
|
|
||||||
@ -126,7 +128,7 @@ _EOF
|
|||||||
```
|
```
|
||||||
|
|
||||||
## SEE ALSO
|
## SEE ALSO
|
||||||
**[podman(1)](podman.1.md)**, **[podman-exec(1)](podman-exec.1.md)**, **quadlet(5)**
|
**[containers.conf(5)](containers.conf.5.md)**, **[podman(1)](podman.1.md)**, **[podman-exec(1)](podman-exec.1.md)**, **quadlet(5)**
|
||||||
|
|
||||||
## HISTORY
|
## HISTORY
|
||||||
May 2023, Originally compiled by Dan Walsh <dwalsh@redhat.com>
|
May 2023, Originally compiled by Dan Walsh <dwalsh@redhat.com>
|
||||||
|
Reference in New Issue
Block a user