-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
26 lines (22 loc) · 925 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# Allow the variant of our base-image to be selected at build time.
ARG BASE_TAG="9.0-jdk11"
ARG BASE_IMAGE="unidata/tomcat-docker:${BASE_TAG}"
FROM ${BASE_IMAGE}
# Record the actual base image used from the FROM command in the build output.
ARG BASE_IMAGE=$BASE_IMAGE
LABEL org.opencontainers.image.base.name=${BASE_IMAGE}
# Run updates for all OS packages in case the base image is old
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update && \
apt-get dist-upgrade -y && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
# Install the extension files into the Tomcat configuration directory
ARG LOG4J_VERSION
ENV LOG4J_VERSION=${LOG4J_VERSION:-2.23.1}
COPY ./tomcat/* "${CATALINA_HOME}/conf/"
RUN chmod 0755 "${CATALINA_HOME}/conf/"*.sh \
&& "${CATALINA_HOME}/conf/install_extensions.sh"
# Use the extension entrypoint script and command
ENTRYPOINT ["/entrypoint_wrapper.sh"]
CMD ["catalina.sh", "run"]