ptuomola commented on a change in pull request #807:
URL: https://github.com/apache/fineract/pull/807#discussion_r420357069



##########
File path: Dockerfile
##########
@@ -37,18 +37,20 @@ RUN ./gradlew clean -x rat -x test war
 
 # =========================================
 
-FROM bitnami/tomcat:7.0.94 as fineract
+FROM bitnami/tomcat:latest as fineract
 
-ENV JAVA_HOME /usr/lib/jvm/java-8-openjdk-amd64/jre
+ENV JAVA_HOME /usr/local/openjdk-8/jre
 
 USER root
 RUN apt-get update -qq && apt-get install -y wget
 
 COPY --from=builder /fineract/build/libs/fineract-provider.war 
/opt/bitnami/tomcat/webapps
+COPY --from=builder /usr/local/openjdk-8/jre /usr/local/openjdk-8/jre
 
 RUN keytool -genkey -keyalg RSA -alias tomcat -keystore 
/opt/bitnami/tomcat/tomcat.keystore -keypass xyz123 -storepass xyz123 -noprompt 
-dname "CN=Fineract, OU=Fineract, O=Fineract, L=Unknown, ST=Unknown, C=Unknown"
 COPY ./docker/server.xml /opt/bitnami/tomcat/conf
 RUN chmod 664 /opt/bitnami/tomcat/conf/server.xml
+#RUN chown -R tomcat /opt/bitnami/tomcat

Review comment:
       There's a problem with the Docker image for Tomcat: the temp directory 
is owned by root rather than tomcat - which means Tomcat spits out an error 
message when starting. 
   
   I was first going to fix it by changing owner of all of the directories to 
Tomcat (i.e. this line), but then realised there are actually two temp 
directories: /opt/bitnami/tomcat/tmp and /opt/bitnami/tomcat/temp. 
   
   /opt/bitnami/tomcat/tmp has the right permissions & owner, but for some 
reason the environment variable for temp directory in the Bitnami image points 
to /opt/bitnami/tomcat/temp. 
   
   I decided that this was probably worthy of a separate issue & PR, but looks 
like I forgot to remove the line. This could still be an acceptable solution 
but it might be better just to update the environment variable to point to the 
right directory - i.e. needs to be investigated. I will remove this now.  




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to