Posts

Showing posts from October, 2015

Windwos 7 connecting to Apache Tomcat in a docker container

Image
So you have your docker container running an apache tomcat image and you want to connect to it using your browser. $docker run -d -P tomcat:8-jre8 $docker ps Under ports it tells you this 0.0.0.0:32768->8080/tcp It means that the docker image has tomcat running on 8080 and it is routed to port 32786 on the host. At this point most docker examples say you just pop in the port into your browser and it will work. That is true when your host runs linux , but on windows/mac it is slightly different. Let's explore how docker runs on a windows box. Docker on Windwos/Mac We have Windows sitting on the bare metal running Virtual Box and inside virtual box the default VM is the one that executes the docker commands. Upon closer inspection of the VM settings you can find that it has two network interfaces a NAT-ed connection that allows the default VM to access the internet for updates or to download docker images from the hub and a Host only network interface that al

Windows 7 Docker-Tools 'cannot enable tty mode on non tty input'

Image
So you are all excited to try Docker, you installed the Docker Toolbox, started the Docker Quick Start Terminal using the desktop shortcut. Got through the hurdles of the creation of your default VM in virtual box - this can be hit or miss. Run the hello world image and it is all fine. $docker run hello-world Then you try to execute something more advanced like. $docker run -it tomcat:8-jre8 and you are greeted with error message: 'cannot enable tty mode on non tty input' At this point you may give up (not an option) or start googling - as docker is fairly well supported by the community - you find your way to here and find a solution buried in the comments. $docker-machine ssh default The command logs you on to the default VM in virtual box and now you can run commands like: $docker run -it tomcat:8-jre8 and it works.