Blog

- Showing all posts in category: Windows

Docker runs well on Linux, but in Windows 10 it will run inside a Hyper-V container. So sometimes when you try to do Docker things, it can have it's side effects on Windows.

I tried to run a Docker container on Windows using the Git Bash terminal and it gave me this error:

$ docker run -it debian:jessie
the input device is not a TTY.  If you are using mintty, try prefixing the command with 'winpty'

Note that this is not a specific Docker problem but about the Terminal emulator.

Just like suggested, if you would prefix the command with 'winpty', then the command will execute properly:

$ winpty docker run -it debian:jessie
root@26bbdfcf3d68:/#

So what's the problem then?

It's all about theWindows  terminal emulator you selected during the installation of Git.

Just select the MinTTY terminal. Keep in mind that the MinTTY terminal emulator is not compatible with Windows console programs. Although you could use cmd or Powershell for Windows console programs.

# Windows hostfile is being ignored
Published on 20-05-2016

I had to modify the hosts file on a Windows 10 machine, but the changes were ignored all the time. It took me literally 1 hour to found out why it didn' t work. The client PC was running Windows 7 before and upgraded to Windows 10. He had 2 windows folders.

Usually I navigate to this folder by typing it in the file explorer:

C:\Windows\System32\drivers\etc

The host file was indeed located here. But the changes did not affect. The problem was that there were multiple Windows directories so this one was unused.

To make sure that you will always get the proper hosts file, go to this location by using the %SystemRoot% environment variable:

%SystemRoot%\System32\drivers\etc\hosts

For more generic information about the hosts file, visit this Wikipedia article.