Tomcat starts slowly in docker container

Just a little reminder to self: when running Tomcat with Java 8 in an Ubuntu Docker container, Tomcat will take a very long time (minutes!) to start with even the simplest web application.

The issue is actually documented (not entirely Docker-related). The solution is to modify JAVA_OPTS to use a different random device:

JAVA_OPTS=-Djava.security.egd=file:/dev/urandom

One thought on “Tomcat starts slowly in docker container

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s