Docker Community Forums

Share and learn in the Docker community.

Docker open Tomcat page from container running on virtualbox

(Czar1983) #1

hello everybody

I’am done the first paced training and i can’t open the web page tomcat serveur.

i am using virtualbox on my windows 7. i installed Ubuntuserver and Docker engine.
So when i using this command " Docker run -d -P tomcat;7" everything seems works
Result of command " docker ps "
tomcat:7 0.0.0.:32768->8080/tcp

so when i try to open on my webbrowser on my machine windows 7 myip:32768 and it’s not working

So what must i do ? configure iptables ?

thanks a lot

(Frank) #2

Well my host OS is Linux so maybe it’s a little different and I’m new to Docker but I start the tomcat example as follows:
docker run -it --rm -p 8888:8080 macedemo/tomcat

My docker ps looks totally different than yours:

e7e7720157ce macedemo/tomcat “ run” 6 minutes ago Up 6 minutes>8080/tcp prickly_nobel

But then again I followed this set of directions and did not pull/start directly from the hub. I wanted to work with a dockerfile and see how it worked.

Also looking at what you wrote are these typos?
"Docker run -d -P tomcat; " the “;” I think should be a “:”
"tomcat:7 0.0.0.:32768->8080/tcp " this does not look correct either. Should it not be 4 “0” not 3?

Just some thoughts.

(Czar1983) #3

Hello Frank,

Thanks a lot for your help , but everything it’s working now.

I done on my web brower myip:32768 and it’s work. i can see the tomcat page home
I installed openssh-server and now it’s ok . Maybe the problem don’t came from Ssh …

Thanks to you