Is it correct to say that docker container create --interactive ubuntu is equal to docker container create -a STDIN -a STDOUT -a STDERR --interactive ubuntu?
Is it correct to say that docker container start --interactive <container ID> is equal to docker container start --interactive --attach <container ID>?
I tested the following commands docker container create --interactive --name u8 ubuntu and docker container start --interactive u8 and I can properly interact with the bash shell.
In short, -a or --attach means you attach to standard sreams which will happen by default unless passing -d or --detach, so yes to the question 1., but docker start or docker container start by default will not attach to STDIN as it also menitoned in the output of docker start --help
-a, --attach Attach STDOUT/STDERR and forward signals
But it is true, that @meyay gave you a way to check the config even if the behaviour changes in the future. Currently you can also use this command as well to get the the values of the relevant parameters:
docker inspect <container name or id> | grep -A5 AttachStdin
But it may not work in the future if the structure of the config changes.
Thanks both. Following your suggestions I can conclude that:
docker container create --interactive is equal to docker container create -a STDIN -a STDOUT -a STDERR --interactive
docker container start --interactive is not properly equal to docker container start --interactive --attach, since, as far as I understood, with docker container start --interactive STDOUT/STDERR is attached after sending the first input.