changeset 81:53671513b240

DEP-10: add timezone and locale settings. add java base image. add native APR for tomcat
author smith@nwoca.org
date Mon, 11 Apr 2016 17:46:42 -0400
parents 5c093612ce89
children b2deadc0cf17
files java/Dockerfile postgres/Dockerfile postgres/setupDatabase.sh postgres/setupExtensions.sh tomcat/Dockerfile tomcat/setenv.sh
diffstat 6 files changed, 33 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/java/Dockerfile	Mon Apr 11 17:46:42 2016 -0400
@@ -0,0 +1,13 @@
+FROM docker.ssdt.io/java:8-jre
+
+MAINTAINER Dave Smith <smith@nwoca.org>
+
+RUN echo "ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true" | debconf-set-selections \
+	&& echo 'deb http://httpredir.debian.org/debian jessie contrib' > /etc/apt/sources.list.d/jessie-contrib.list \
+    && apt-get update 									\
+    && apt-get install -y ttf-mscorefonts-installer
+
+ENV TZ=America/New_York
+
+RUN echo $TZ > /etc/timezone \
+    && dpkg-reconfigure --frontend noninteractive tzdata
--- a/postgres/Dockerfile	Fri Apr 08 21:40:03 2016 +0100
+++ b/postgres/Dockerfile	Mon Apr 11 17:46:42 2016 -0400
@@ -17,3 +17,7 @@
 RUN chmod 755 /docker-entrypoint-initdb.d/setupDatabase.sh \
     & chmod 755 /docker-entrypoint-initdb.d/setupExtensions.sh
 
+ENV TZ=America/New_York
+
+RUN     echo $TZ > /etc/timezone \
+    &&  dpkg-reconfigure --frontend noninteractive tzdata
--- a/postgres/setupDatabase.sh	Fri Apr 08 21:40:03 2016 +0100
+++ b/postgres/setupDatabase.sh	Mon Apr 11 17:46:42 2016 -0400
@@ -1,11 +1,13 @@
 #!/bin/bash
 
 export PGUSER=postgres
-TEST=`psql <<- EOSQL
+result=`psql -t -A <<- EOSQL
    SELECT 1 FROM pg_database WHERE datname='$DB_NAME';
 EOSQL`
 
-if [[ $TEST == "1" ]]; then
+echo "checking for existing $DB_NAME ( $result ) "
+
+if [[ $result == "1" ]]; then
     echo "$DB_NAME exists. continuing startup."
     # database exists
     # $? is 0
--- a/postgres/setupExtensions.sh	Fri Apr 08 21:40:03 2016 +0100
+++ b/postgres/setupExtensions.sh	Mon Apr 11 17:46:42 2016 -0400
@@ -1,11 +1,12 @@
 #!/bin/bash
 
 export PGUSER=postgres
-TEST=`psql <<- EOSQL
+result=`psql -t -A <<- EOSQL
    SELECT 1 FROM pg_database WHERE datname='$DB_NAME';
 EOSQL`
 
-if [[ $TEST == "1" ]]; then
+echo "Checking extensions on $DB_NAME ( $result )"
+if [[ $result == "1" ]]; then
     psql $DB_NAME <<- EOSQL
     CREATE EXTENSION IF NOT EXISTS "uuid-ossp";
 EOSQL
--- a/tomcat/Dockerfile	Fri Apr 08 21:40:03 2016 +0100
+++ b/tomcat/Dockerfile	Mon Apr 11 17:46:42 2016 -0400
@@ -1,4 +1,4 @@
-FROM tomcat:8.0.30-jre8
+FROM tomcat:8.0.33-jre8
 
 MAINTAINER Dave Smith <smith@nwoca.org>
 
@@ -14,3 +14,9 @@
 
 RUN rm -rf webapps/docs webapps/ROOT webapps/examples webapps/docs webapps/host-manager \
 	&& chmod +x bin/setenv.sh
+	
+ENV TZ=America/New_York
+
+ENV LD_LIBRARY_PATH ${LD_LIBRARY_PATH}:/usr/lib/x86_64-linux-gnu/
+
+RUN apt-get install -y libtcnative-1
\ No newline at end of file
--- a/tomcat/setenv.sh	Fri Apr 08 21:40:03 2016 +0100
+++ b/tomcat/setenv.sh	Mon Apr 11 17:46:42 2016 -0400
@@ -4,8 +4,9 @@
 
 export CATALINA_OPTS="$CATALINA_OPTS -XX:+UseG1GC"
 export CATALINA_OPTS="$CATALINA_OPTS -XX:+UseStringDeduplication "
-export CATALINA_OPTS="$CATALINA_OPTS -XX:+UseCompressedOops"
 export CATALINA_OPTS="$CATALINA_OPTS -Djava.security.egd=file:/dev/./urandom"
+export CATALINA_OPTS="$CATALINA_OPTS -Duser.language=en"
+export CATALINA_OPTS="$CATALINA_OPTS -Duser.region=US"
 
 echo "Using CATALINA_OPTS $CATALINA_OPTS"
 echo "Using     JAVA_OPTS $JAVA_OPTS"