久久国产成人av_抖音国产毛片_a片网站免费观看_A片无码播放手机在线观看,色五月在线观看,亚洲精品m在线观看,女人自慰的免费网址,悠悠在线观看精品视频,一级日本片免费的,亚洲精品久,国产精品成人久久久久久久

分享

The issue about using Git bash for Docker in window

 JhouShuai 2018-12-10

報錯:the input device is not a TTY.  If you are using mintty, try prefixing the command with 'winpty'

 

 


I recently installed Docker for Windows on my laptop. When I tried running the default docker run -it ubuntu bash demo from Git Bash, I ran into an issue I hadn’t seen before.

  1. $ docker run -it ubuntu bash
  2. the input device is not a TTY. If you are using mintty, try prefixing the command with 'winpty'
As it turns out, following the instructions and prefixing the command with winpty does work
  1. $ winpty docker run -it ubuntu bash
  2. root@88448b75631d:/#

However, I’m never satisfied with just getting around an issue, so I did some more digging. Turns out the issue here is the use of MinTTY to host the Git Bash prompt. If you’ve installed Git for Windows, you’ll recall the following configuration window.

If you select the “Use MinTTY” option, your Bash pompt will be hosted in the MinTTY terminal emulator, rather than the CMD console that ships with Windows. The MinTTY terminal emulator isn’t compatible with Windows console programs unless you prefix your commands with winpty.

Personally, I prefer the default CMD console, especially in Windows 10 where features like window resizing and text selection are drastically improved. If you want to go back to that mode, simply re-run the Git for Windows installer and chose the non-MinTTY option. If you want to stick with MinTTY, you just need to prefix your interactive Docker (and Python, and Node, and …) commands with winpty.


為了更為方便地使用Git Bash,,可以在Git的安裝目錄中找到etc,也即“C:\Program Files\Git\etc”

找到“bash.bashrc”后,,以記事本方式打開并在文件的文后追加 

 alias python='winpty python '

alias docker='winpty docker '

即可,;如此則會在每次啟動Git Bash時,,軟件會自動進行初始化配置。

 
 






原創(chuàng)地址:https://blog.csdn.net/m0_37728974/article/details/70313044

    本站是提供個人知識管理的網(wǎng)絡(luò)存儲空間,,所有內(nèi)容均由用戶發(fā)布,,不代表本站觀點。請注意甄別內(nèi)容中的聯(lián)系方式,、誘導(dǎo)購買等信息,,謹防詐騙。如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,,請點擊一鍵舉報,。
    轉(zhuǎn)藏 分享 獻花(0

    0條評論

    發(fā)表

    請遵守用戶 評論公約

    類似文章 更多