feat(compose): support stdin_open and tty (#419)

* feat: support stdin_open and tty

This can be useful to leave a container running without specifying a
command like `sleep`, and probably in other situations as well.

Signed-off-by: Miek Gieben <miek@miek.nl>

* Complete full spec test case

Signed-off-by: Miek Gieben <miek@miek.nl>

* fix container log streaming for containers with TTY

---------

Signed-off-by: Miek Gieben <miek@miek.nl>
Co-authored-by: Pasha Sviderski <me@psviderski.name>
This commit is contained in:
Miek Gieben
2026-07-30 21:50:54 +10:00
committed by GitHub
co-authored by Pasha Sviderski
parent 351698c280
commit b7e224a1ef
9 changed files with 205 additions and 9 deletions
+3 -1
View File
@@ -562,7 +562,9 @@ func (s *Server) CreateServiceContainer(
api.LabelServiceMode: spec.Mode,
api.LabelManaged: "",
},
User: spec.Container.User,
User: spec.Container.User,
Tty: spec.Container.Tty,
OpenStdin: spec.Container.OpenStdin,
}
if spec.Mode == "" {
config.Labels[api.LabelServiceMode] = api.ServiceModeReplicated