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

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





On 03/03/2016 10:04 AM, Jan Pazdziora wrote:
Hello,

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
causes

	$ 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?

I think this is the use case that Nulecule is trying to address, defining local customizations.


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