[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[atomic-devel] Using docker run -ti for interactive INSTALL?


I have container images where the INSTALL phase can be interactive,
asking questions, and also passwords.

For that, it would make sense to define INSTALL as

	docker run -ti ...

so that the setup script can disable echo on the terminal.

However, for cases like automated deployments via puppet or kickstarts
when parameters will be passed via command line, having stdin closed

	$ docker run --rm -ti fedora id < /dev/null
	cannot enable tty mode on non tty input

What is the best approach to be able to support interactive INSTALLs
with tty, as well as batched invocations?

Ideally docker run's --tty option would accept not just true and false
but also something like true-if-possible to not fail. Does is sound
like something worth proposing?

Alternatively atomic could add support for something like
${INTERACTIVE} in the INSTALL / RUN / UNINSTALL which would expand to
-ti when stdin exists and is tty, but to empty string when not. Or
atomic could even accept that -ti option to be explicit about the
invocation method.

What do you guys recommend?

Jan Pazdziora
Senior Principal Software Engineer, Identity Management Engineering, Red Hat

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]