forked from terrestris/docker-tomcat
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
32 lines (23 loc) · 773 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
27
28
29
30
31
32
# Use a minimal image as parent
FROM openjdk:8-jdk-alpine
# Environment variables
ENV TOMCAT_MAJOR=8 \
TOMCAT_VERSION=8.5.37 \
CATALINA_HOME=/opt/tomcat
# init
RUN apk -U upgrade --update && \
apk add curl && \
apk add ttf-dejavu
RUN mkdir -p /opt
# install tomcat
RUN curl -jkSL -o /tmp/apache-tomcat.tar.gz http://archive.apache.org/dist/tomcat/tomcat-${TOMCAT_MAJOR}/v${TOMCAT_VERSION}/bin/apache-tomcat-${TOMCAT_VERSION}.tar.gz && \
gunzip /tmp/apache-tomcat.tar.gz && \
tar -C /opt -xf /tmp/apache-tomcat.tar && \
ln -s /opt/apache-tomcat-$TOMCAT_VERSION $CATALINA_HOME
# cleanup
RUN apk del curl && \
rm -rf /tmp/* /var/cache/apk/*
EXPOSE 8080
COPY startup.sh /opt/startup.sh
ENTRYPOINT /opt/startup.sh
WORKDIR $CATALINA_HOME