All Downloads are FREE. Search and download functionalities are using the official Maven repository.

files.home.templates.tomcat.Dockerfile.fm Maven / Gradle / Ivy

The newest version!
FROM debian:stretch-slim

#CONFIG String version 9.0.13
#CONFIG String opts
#CONFIG Boolean debug false
#CONFIG Boolean suspend false


#
# prepare context
#

# ${tomcat.download(r"https://archive.apache.org/dist/tomcat/tomcat-${major}/v${version}/bin/apache-tomcat-${version}.tar.gz", version)}
# ${tomcat.serverXml(version, "STRICT", null)}

#
# real docker commands
#

# make sure we get UTF-8 file.encoding
ENV LANG C.UTF-8

ENV JAVA_DEBIAN_VERSION 8u171-b11-1~deb9u1
ENV JAVA_HOME /usr/lib/jvm/java-8-openjdk-amd64/jre

RUN set -x; \
	if [ ! -d /usr/share/man/man1 ]; then \
		mkdir -p /usr/share/man/man1; \
	fi; \
	apt-get update && apt-get install -y --no-install-recommends ca-certificates curl wget procps bzip2 unzip xz-utils gpg openjdk-8-jre="$JAVA_DEBIAN_VERSION" && rm -rf /var/lib/apt/lists/*

COPY tomcat /tmp/tomcat
ENV CATALINA_OPTS ${tomcat.catalinaOpts(opts, debug, suspend)}
ENV CATALINA_HOME /usr/local/tomcat
RUN set -x; \
    mkdir $CATALINA_HOME; \
    cd $CATALINA_HOME; \
    tar zxf /tmp/tomcat/tomcat.tar.gz --strip-components=1; \
    rm -rf $CATALINA_HOME/webapps; \
    rm -rf $CATALINA_HOME/logs; \
    mkdir /var/log/stool; \
    ln -s /var/log/stool $CATALINA_HOME/logs; \
    cp /tmp/tomcat/server.xml $CATALINA_HOME/conf/; \
    cp /tmp/tomcat/ssl/tomcat.jks $CATALINA_HOME/conf/; \
    rm -rf /tmp/tomcat


WORKDIR $CATALINA_HOME

CMD ["bin/catalina.sh", "run"]




© 2015 - 2024 Weber Informatics LLC | Privacy Policy