Cannot Access Containers in Windows

Hi All,

I Have created a Docker image for JBoss-EAP, and I am using docker-compose to spin up the image. I was able to spin up the containers in Linux and can able to access the containers by the IP address obtained by inspecting the container, but while spinning up the same image in Windows Docker I couldn’t able to access the container from the address that I got by inspecting it. Since I am pretty new to Docker for Windows please guide me on how to access containers in windows docker.

Publish one or more ports from your container:

docker container run … -p 8080:8080 …

Then access it with http://localhost:8080. 8080 is just an example, check the docs of your image for the ports it is listening.
The idea is not to access containers directly, but always to publish some ports. On Windows Docker runs in a separate virtual machine with its own network, but you should not have to worry about that.

could you please provide the steps how you run the container in Linux and Windows?

Thanks a lot,