Ask Your Question
3

What is the reason for expect not succeeding when the docker container is executed without using the --interactive flag?

asked 2021-05-04 11:00:00 +0000

bukephalos gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2022-02-24 04:00:00 +0000

lakamha gravatar image

The expect command is used to automate interactive tasks. When the docker container is executed without the --interactive flag, it runs in non-interactive mode, which means that it does not allocate a TTY (teletype) for the container, and the standard input is closed. Therefore, expect cannot interact with the container as there is no interactive session available. Without a TTY, the input sent to the docker command is not considered as interactive, so expect fails to send any input to the container.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2021-05-04 11:00:00 +0000

Seen: 1 times

Last updated: Feb 24 '22