Docker Community Forums

Share and learn in the Docker community.

Can't connect to container on localhost with port mapping

thx a lot it’s on >>>>>>>>>>>>

Thanks. it solved my problem.

worked for me . Thanks a lot.

You save my life! thank you!

Worked for me , Thanks a alot @swethavisalam

Finally!!! Life Saviour :smiley:

Running the same type of -p option on Windows 2016 also does not work. On the Windows 2016 I tried all of the available ip addresses but only the address shown from docker inspect and the original port from the EXPOSE statement worked. I could swear this worked before, and have been doing this for all of this year with the linux/mac versions of docker.

worked!! Thanks a lot

Hi All, I have java application which I run using “javaws http://localhost:9088/rtccClient/rtcc.jnlp” from my windows machine. I created docker Linux container in my windows machine for my java application and it has ip “” and in docker file I exposed 9080 port. I am running my docker as below.
“docker run --name recontainer17 -d -p 9088:9080 reimage17” after that I was trying to run the application as below.
“javaws http://localhost:9088/rtccClient/rtcc.jnlp”. but it was not working. please help how to run my java application from my windows host machine. I even tried as "javaws
below is my docker file.
FROM ibmcom/websphere-liberty:latest
USER root
RUN yum -y install unixODBC
RUN yum -y install libaio
RUN mkdir -pv /basic
RUN mkdir -pv /resources/security
COPY ./basicinstaclient/oracle-instantclient19.8-basic- /basic/
RUN rpm -i /basic/oracle-instantclient19.8-basic-
ADD ./rtcc.ear /opt/ibm/wlp/usr/servers/defaultServer/apps
ADD ./rtccClient.war /opt/ibm/wlp/usr/servers/defaultServer/apps
ADD ./resources/ /opt/ibm/wlp/usr/servers/defaultServer
ADD ./resources/server.xml /opt/ibm/wlp/usr/servers/defaultServer
ADD ./resources/hibernate/ /opt/ibm/wlp/usr/servers/defaultServer/hibernate
ADD ./resources/oracle/ /opt/ibm/wlp/usr/servers/defaultServer/oracle
ADD ./certificates/ /opt/ibm/wlp/usr/servers/defaultServer/resources/security