简体   繁体   中英

Interactive command-line application in a Docker container

I have a command-line application that needs to ask questions interactively from the user. It has grown into a big project, and every time I upgrade my system, I have to worry about having possibly broken some parts of it, due to some unusual dependencies.

My idea was to package it into a Docker container, so I could upgrade my system without worrying about the stability of this project. This was my first time trying Docker, and I have done some tests, but the output goes to the log instead, and I'm not sure on how to deal with the user input. Isn't Docker appropriate for this type of application?

To run your container interactively, use docker -it ... to get an interactive tty. If you need more details of how this works, see the reference documentation or provide a specific example and command line that's giving you issues.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM