1. 程式人生 > >The issue about using Git bash for Docker in window

The issue about using Git bash for Docker in window

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.

$ docker run -it ubuntu bash
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
$ winpty docker run -it ubuntu bash
[email protected]:/#

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

.


相關推薦

The issue about using Git bash for Docker in window

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

The issue about the GMT paper can't display all the seismograms

I try to display seismograms using 'pssac' by the command: gmt pssac *.z -JX20c/40c -R0/160/12/92 -Bx20+l'T(s)' -By2+lkm -BWSen -Ek -M1.5c -W0.5p,red &

The bug about using hooks and MirroredStrategy in tf.estimator.Estimator

When I was using MirroedStrategy in my tf.estimator.Estimator: Python distribution = tf.contrib.distribute.MirroredStrat

Why does the method of Lagrange multipliers work for optimization in multivariable calculus?

今天看到拉格朗日乘子,kkt演算法的時候,突然想起來,為什麼拉格朗日演算法可以呢?直觀上怎麼理解呢? 發現還是quora上面的答案比較清晰直觀。 拉格朗日演算法其實相當於首先有了一個函式f的空間分佈,但是有了空間分佈還不夠,還需要有約束條件g。約束條件g

centos7下docker啟動失敗--ob for docker.service failed because the control process exited with error code.

今天在配置openshift用docker部署映象的時候,啟動docker發現竟然啟動失敗:     之前是可以啟動的,突然不能啟動了,想到我改了配置檔案: 執行: vim /etc/sysconfig/docker 可能是家的內容有問題

解決Docker啟動伺服器連結失敗-Job for docker.service failed because the control process exited error code

今天裝Docker炸了一波,老是連不上伺服器,提示: Job for docker.service failed because the control 就像這樣,使用  docker version 命令以後,只顯示了client ,提示錯誤 使用 sudo

【Steve_Abelieve】Don't worry too much about the ambiguous future, just make effort for explicit being present.

Don't worry too much about the ambiguous future, just make effort for explicit being present.

Opinionated openness: Facebook AI research strategy, ecosystem, and target audience for Deep Learning, and the nuances of using

Chintala's take is that some people would have to be assigned on something like this anyway. If PyTorch had not been created, the other option would be to

How Online Retailers Can Prepare for the Holiday Season Using AI

It may still be warm and sunny out, but as retailers know, the holidays will arrive before you know it and shoppers will be looking for the best online

計算BashDocker容器使用的總記憶體[英]Compute the total memory used by Docker containers in Bash

How to compute in one Bash command line the total memory used by Docker containers running on the local Docker engine? 如何在一個Bash命令列中計算在本地Docker引擎上執行

Using Device Jobs for Over-the-Air Updates

Whether it’s a firmware update or security patch, an update to a config file on a device, or a factory reset, all products need maintenance after

Set Up an HTTP Proxy for Docker and the ECS Agent in Enterprise Linux

docker run --name ecs-agent \ --env=ECS_ENABLE_TASK_IAM_ROLE_NETWORK_HOST=true \ --env=ECS_ENABLE_TASK_IAM_ROLE=true \ --env "NO_PROXY=169.254.1

The More You Know: Using Knowledge Graphs for Image Classification ——用知識圖譜進行影象分類論文閱讀筆記

Abstract  使人類區別於現代基於學習的計算機視覺演算法的一個特徵是獲得關於世界的知識並使用該知識推理關於視覺世界的能力。人類可以瞭解物體的特徵以及它們之間發生的關係,從而學習各種各樣的視覺概念,並且可以通過很少的例子學習。本文研究了知識圖譜形式的結構化先驗知

解決Job for docker.service failed because the control process exited with error code. See "systemctl s

在ubuntu16.04下安裝安裝docker docker daemon啟不起來,報如下錯誤: Job for docker.service failed because the control process exited with error code. See "s

利用git bashgit gui向git遠程倉庫提交文件

article bash 命令 rep 路徑 stage chang osi .html 1、首先在該文件夾下git init 2、然後在github下面創建一個新倉庫去存儲你的代碼 3、然後利用add添加遠程倉庫 4、然後點擊stage changed 5、最後點擊長傳

Transfer learning & The art of using Pre-trained Models in Deep Learning

tran topic led super entire pooling file under mina 原文網址: https://www.analyticsvidhya.com/blog/2017/06/transfer-learning-the-art-of-fine

Git bash一閃而過,git不能push到遠程倉庫。

bin ash 重啟 dll bsp eba ould bash git git錯誤棧:D:\Git\bin\ssh.exe: *** Couldn‘t reserve space for cygwin‘s heap, Win32 error 487 解決辦法: 進入git

[React Intl] Format a Date Relative to the Current Date Using react-intl FormattedRelative

update control att tex use lan ada form -i Given a date, we’ll use the react-intl FormattedRelative component to render a date in a

使用Git BashGit上下載代碼到本地以及上傳代碼到碼雲Git

itl git clone 克隆 ast var symbol 執行命令 密碼 兩個 前提是已經安裝了GitBash,這個稍後再出教程 1、新建一個目錄,存放下載下來的項目,我在D盤新建了一個“gitspace”文件夾,用來存放下載下來的項目 2、進入剛剛新建的文件夾

使用Git Bash生成新的ssh key

配置 use gen 當前 http 開發項目 rsa mail mos 使用Git Bash生成新的ssh key。 $ cd ~ ///保證當前路徑在”~”下 $ ssh-keygen -t rsa -C "你的郵箱地址" ///建議填寫自己真實有效的郵箱地址 結果