Docker & Tomcat. Handing on "Deploying web application directory"

February 7, 2016 2k views
Docker Ubuntu

Hey guys,

To make sure I wasn't made I just spun up a new droplet and ran this command from the official tomcat docker page.

docker run -it --rm -p 8888:8080 tomcat

Logs from the output. Wondering if anyone can help me out here?

root@ubuntu-512mb-lon1-01:~# docker run -it --rm -p 8888:8080 tomcat
Unable to find image 'tomcat:latest' locally
latest: Pulling from library/tomcat
03e1855d4f31: Pull complete
a3ed95caeb02: Pull complete
9269ba3950bb: Pull complete
785ac756bcc8: Pull complete
9429cf2b87a5: Pull complete
b58520866e0f: Pull complete
98262b08d867: Pull complete
9779aa321ead: Pull complete
7713064a4fa5: Pull complete
Digest: sha256:da2f3594cde4ca11d1eb98181f76cccd63b8f94f26373b1c2fdfefa423c87bc5
Status: Downloaded newer image for tomcat:latest
Using CATALINA_BASE:   /usr/local/tomcat
Using CATALINA_HOME:   /usr/local/tomcat
Using CATALINA_TMPDIR: /usr/local/tomcat/temp
Using JRE_HOME:        /usr/lib/jvm/java-7-openjdk-amd64/jre
Using CLASSPATH:       /usr/local/tomcat/bin/bootstrap.jar:/usr/local/tomcat/bin/tomcat-juli.jar
07-Feb-2016 00:36:24.062 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version:        Apache Tomcat/8.0.30
07-Feb-2016 00:36:24.065 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server built:          Dec 1 2015 22:30:46 UTC
07-Feb-2016 00:36:24.066 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server number:         8.0.30.0
07-Feb-2016 00:36:24.066 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name:               Linux
07-Feb-2016 00:36:24.067 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Version:            3.13.0-77-generic
07-Feb-2016 00:36:24.067 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Architecture:          amd64
07-Feb-2016 00:36:24.068 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Java Home:             /usr/lib/jvm/java-7-openjdk-amd64/jre
07-Feb-2016 00:36:24.069 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Version:           1.7.0_91-b02
07-Feb-2016 00:36:24.069 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor:            Oracle Corporation
07-Feb-2016 00:36:24.070 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE:         /usr/local/tomcat
07-Feb-2016 00:36:24.070 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME:         /usr/local/tomcat
07-Feb-2016 00:36:24.071 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.config.file=/usr/local/tomcat/conf/logging.properties
07-Feb-2016 00:36:24.072 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
07-Feb-2016 00:36:24.072 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.endorsed.dirs=/usr/local/tomcat/endorsed
07-Feb-2016 00:36:24.073 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.base=/usr/local/tomcat
07-Feb-2016 00:36:24.073 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.home=/usr/local/tomcat
07-Feb-2016 00:36:24.074 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.io.tmpdir=/usr/local/tomcat/temp
07-Feb-2016 00:36:24.074 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/java/packages/lib/amd64:/usr/lib/x86_64-linux-gnu/jni:/lib/x86_64-linux-gnu:/usr/lib/x86_64-linux-gnu:/usr/lib/jni:/lib:/usr/lib
07-Feb-2016 00:36:24.296 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-8080"]
07-Feb-2016 00:36:24.340 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
07-Feb-2016 00:36:24.345 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["ajp-nio-8009"]
07-Feb-2016 00:36:24.384 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
07-Feb-2016 00:36:24.387 INFO [main] org.apache.catalina.startup.Catalina.load Initialization processed in 1481 ms
07-Feb-2016 00:36:24.457 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service Catalina
07-Feb-2016 00:36:24.463 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet Engine: Apache Tomcat/8.0.30
07-Feb-2016 00:36:24.512 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory /usr/local/tomcat/webapps/host-manager

1 comment
2 Answers

Turns out it did spin up after just 8 minutes... I would still like to know why it took so long!

07-Feb-2016 00:39:27.138 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 474433 ms

  • What size memory is your droplet? Also, when you run 'free' at the console, what are the values for used and free columns? I tried your docker command on my test droplet while having 2 other containers already actively running, and the startup time was 3874 ms.

Have another answer? Share your knowledge.