August 2017
Intermediate to advanced
332 pages
9h 16m
English
Let's start with a simple example, and run a Tomcat server directly from Docker Hub:
$ docker run -d tomcat
Tomcat is a web application server whose user interface can be accessed by the port 8080. Therefore, if we installed Tomcat on our machine, we could browse it at http://localhost:8080.
In our case, however, Tomcat is running inside the Docker container. We started it the same way we did with the first Hello World example. We can see it's running:
$ docker psCONTAINER ID IMAGE COMMAND STATUS PORTS NAMESd51ad8634fac tomcat "catalina.sh run" Up About a minute 8080/tcp jovial_kare
Since it's run as a daemon (with the -d option), we don't see the logs in the console right away. We can, however, access it by executing the ...
Read now
Unlock full access