37 lines
1.5 KiB
Docker
37 lines
1.5 KiB
Docker
FROM danielberteaud/java:17.24.1-10
|
|
MAINTAINER Daniel Berteaud <dbd@ehtrace.com>
|
|
|
|
ARG TOMCAT_VERSION=9.0.85 \
|
|
DIAGRAMS_VERSION=23.0.2
|
|
|
|
ENV CATALINA_HOME=/opt/tomcat \
|
|
TOMCAT_PORT=8282 \
|
|
TOMCAT_ADDRESS=0.0.0.0
|
|
|
|
RUN set -euxo pipefail &&\
|
|
cd /tmp &&\
|
|
apk --no-cache update &&\
|
|
apk --no-cache add bash &&\
|
|
curl -sSLO https://dlcdn.apache.org/tomcat/tomcat-9/v${TOMCAT_VERSION}/bin/apache-tomcat-${TOMCAT_VERSION}.tar.gz &&\
|
|
curl -sSLO https://dlcdn.apache.org/tomcat/tomcat-9/v${TOMCAT_VERSION}/bin/apache-tomcat-${TOMCAT_VERSION}.tar.gz.sha512 &&\
|
|
sha512sum -c < apache-tomcat-${TOMCAT_VERSION}.tar.gz.sha512 &&\
|
|
mkdir -p /opt/tomcat &&\
|
|
tar xvzf apache-tomcat-${TOMCAT_VERSION}.tar.gz --strip-components 1 --directory ${CATALINA_HOME} &&\
|
|
find /opt/tomcat -type d -exec chmod 755 "{}" \; &&\
|
|
find /opt/tomcat -type f -exec chmod 644 "{}" \; &&\
|
|
chmod +x /opt/tomcat/bin/* &&\
|
|
rm -f apache-tomcat-${TOMCAT_VERSION}.tar.gz.sha512 apache-tomcat-${TOMCAT_VERSION}.tar.gz &&\
|
|
curl -sSLO https://github.com/jgraph/drawio/releases/download/v${DIAGRAMS_VERSION}/draw.war &&\
|
|
unzip draw.war -d ${CATALINA_HOME}/webapps/draw &&\
|
|
rm -f draw.war &&\
|
|
addgroup --gid 8282 diagrams &&\
|
|
adduser --system --ingroup diagrams --disabled-password --uid 8282 --home ${CATALINA_HOME} --shell /sbin/nologin diagrams
|
|
|
|
COPY root/ /
|
|
|
|
WORKDIR ${CATALINA_HOME}
|
|
EXPOSE ${TOMCAT_PORT}
|
|
USER diagrams
|
|
CMD ["/opt/tomcat/bin/catalina.sh", "run"]
|
|
|