## let "Tomcat Native" live somewhere isolated ENV TOMCAT_NATIVE_LIBDIR $CATALINA_HOME/native-jni-lib ENV LD_LIBRARY_PATH ${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}$TOMCAT_NATIVE_LIBDIR
## runtime dependencies for Tomcat Native Libraries ## Tomcat Native 1.2+ requires a newer version of OpenSSL than debian:jessie has available ## > checking OpenSSL library version >= 1.0.2... ## > configure: error: Your version of OpenSSL is not compatible with this version of tcnative ## see http://tomcat.10.x6.nabble.com/VOTE-Release-Apache-Tomcat-8-0-32-tp5046007p5046024.html (and following discussion) ## and https://github.com/docker-library/tomcat/pull/31
ENV OPENSSL_VERSION 1.0.2g-1ubuntu4.8
## RUN set -ex; \ ## if ! grep -q stretch /etc/apt/sources.list; then \ ## # only add stretch if we're not already building from within stretch ## { \ ## echo 'deb http://deb.debian.org/debian stretch main'; \ ## } > /etc/apt/sources.list.d/stretch.list; \ ## { \ ## # add a negative "Pin-Priority" so that we never ever get packages from stretch unless we explicitly request them ## echo 'Package: *'; \ ## echo 'Pin: release n=stretch'; \ ## echo 'Pin-Priority: -10'; \ ## echo; \ ## # ... except OpenSSL, which is the reason we're here ## echo 'Package: openssl libssl*'; \ ## echo "Pin: version $OPENSSL_VERSION"; \ ## echo 'Pin-Priority: 990'; \ ## } > /etc/apt/preferences.d/stretch-openssl; \ ## fi
## see https://www.apache.org/dist/tomcat/tomcat-$TOMCAT_MAJOR/KEYS ## see also "update.sh" (https://github.com/docker-library/tomcat/blob/master/update.sh)
if [-f /.tomcat_admin_created]; then echo"Tomcat 'admin' user already created" exit 0 fi
## generate password PASS=${TOMCAT_PASS:-$(pwgen -s 12 1)} _word=$([ ${TOMCAT_PASS} ] && echo"preset" || echo"random") echo"=> Creating and admin user with a ${_word} password in Tomcat"
<?xml version='1.0' encoding='utf-8'?> <!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. -->
<!-- NOTE: By default, no user is included in the "manager-gui" role required to operate the "/manager/html" web application. If you wish to use this app, you must define such a user - the username and password are arbitrary. It is strongly recommended that you do NOT use one of the users in the commented out section below since they are intended for use with the examples web application. -->
<!-- NOTE: The sample user and role entries below are intended for use with the examples web application. They are wrapped in a comment and thus are ignored when reading this file. If you wish to configure these users for use with the examples web application, do not forget to remove the <!.. ..> that surrounds them. You will also need to set the passwords to something appropriate. -->