It depends of how did you run the container. If you specified
-p option, then you mapped ports from your host to the container in order to access it directly on your localhost. I mean, for example, if you put on docker run command
-p 5555:80, you are mapping container port 80 to host's port 5555, so you can access to it on
If you don't want to map ports in order to prevent anyone on your network can access to the container through your host, run it without
-pand then you can do a
docker inspect command to find the container ip address. Because the containers by default are accessible only by the host machine on a specific ip. Docker set iptables on run and allow only to you to access to the container. You can do
docker inspect yourContainerName | grep '"IPAddress"' | head -n 1 and you'll get the ip address of your container. Then you can access only from the host to
Hope it helps.