Its simple, All you have to do is expose the container at the time of its creation like suppose you wanted to launch an nginx container and also wanted to be able to access it from outside you can do so in this way:
$ sudo docker run -d -p 9090:80 -t nginx
Now Nginx will be available at the port 80 of your localhost which is basically the default port.
so you can access it by going to your browser and typing this in the navigation bar:
localhost
If you get the nginx welcome message that means the task was successful. you can repeat this with the port & application of your choice ( eg. 8080 & tomcat )
Hope this helped :)
New to docker ? need help in understanding its concepts ? Looking for great customers? try out docker training course.