CAFapi/opensuse-tomcat-image

opensuse-tomcat-image without LogBack

Closed this issue ยท 11 comments

It would be great if there were an image with opensuse, java8 and default tomcat, i.e. tomcat not modified to use LogBack for logging. In order to use the image with LogBack my team have to reverse the changes made for LogBack logging so our application's logging works correctly.

Please ignore #57, this has been replaced with #59

Just wondering on the status of this.

Unfortunately it has missed the December release, which was done a few days ago. I'd expect it to get into the January release.

@dhsmith1001 The January base image releases will be happening soon so this image will be available then.

@dhsmith1001 We will be testing this of course but if you're able to help you can pull the pre-release image from here:

docker image pull cafapi/prereleases:opensuse-tomcat-juli-5.7.0-SNAPSHOT

It would be good to get your confirmation on this before the January round.

@dhsmith1001 We will be testing this of course but if you're able to help you can pull the pre-release image from here:

docker image pull cafapi/prereleases:opensuse-tomcat-juli-5.7.0-SNAPSHOT

It would be good to get your confirmation on this before the January round.

@dermot-hardy Is it deliberate that there is no longer a $CATALINA_HOME/bin/setenv.sh file?

@dermot-hardy Is it deliberate that there is no longer a $CATALINA_HOME/bin/setenv.sh file?

Nevermind, I checked the old setenv.sh in the 5.6.3 image and it just contains something for logback. I will make the changes in our consuming images to allow for situations where setenv.sh is not present.

It is an optional file in Tomcat that is executed if it is present, and as you say we were only using it to configure Logback, which is why it's not there in the JULI image.

@dermot-hardy For the AccessLogValve it is set to send files to the /dev folder. Is there a reason for that? In our derivative we have a non-root user that does not have permissions to that folder, so we will be altering the AccessLogValve to output to the $CATALINA_HOME/log folder instead for now.

<!-- Access log processes all example.
     Documentation at: /docs/config/valve.html
     Note: The pattern used is equivalent to using pattern="common" -->
<Valve className="org.apache.catalina.valves.AccessLogValve" directory="/dev" prefix="stderr" rotatable="false" pattern="%h %l %u %t &quot;%r&quot; %s %b" encoding="UTF-8" buffered="false"/>

It's /dev/stderr, so that it writes the logs to the standard error stream (which is a bit of a misnomer โ€“ it should really have been called the standard logging stream but in the old days they only ever logged errors). Anyway, writing the logs stdout or stderr should allow you to more easily route the logs outside of the container. I wouldn't have expected that you would want to write them to a file inside the container. That would make them hard to access and manage.