2020-10-22 20:42:45 +02:00
|
|
|
IMAGE alpine3.12-tomcat8.5_8.5.59-201021
|
|
|
|
FROM alpine3.12-java8_8.252.09-201021
|
2019-03-01 12:21:18 +01:00
|
|
|
|
|
|
|
RUN EOF
|
|
|
|
# Install Tomcat 8.5
|
2020-10-22 20:42:45 +02:00
|
|
|
wget https://archive.apache.org/dist/tomcat/tomcat-8/v8.5.59/bin/apache-tomcat-8.5.59.tar.gz -O - | tar xzf - -C /srv
|
2020-03-24 15:15:26 +01:00
|
|
|
mv /srv/apache-tomcat-* /srv/tomcat
|
2019-03-01 12:21:18 +01:00
|
|
|
|
|
|
|
# Make catalina.sh available globally
|
|
|
|
ln -s /srv/tomcat/bin/catalina.sh /usr/bin/catalina.sh
|
|
|
|
|
|
|
|
# Cleanup
|
|
|
|
rm -f /srv/tomcat/bin/tomcat-native.tar.gz
|
|
|
|
rm -f /srv/tomcat/temp/safeToDelete.tmp
|
2019-11-30 19:00:03 +01:00
|
|
|
rm -rf /srv/tomcat/webapps/*
|
2019-03-01 12:21:18 +01:00
|
|
|
EOF
|
|
|
|
|
2020-03-13 17:03:03 +01:00
|
|
|
COPY image.d
|
2019-09-18 11:29:58 +02:00
|
|
|
|
2019-11-30 19:00:03 +01:00
|
|
|
RUN EOF
|
|
|
|
# Create OS user
|
|
|
|
addgroup -S -g 8080 tomcat
|
|
|
|
adduser -S -u 8080 -h /srv/tomcat -s /bin/false -g tomcat -G tomcat tomcat
|
2020-03-20 15:21:16 +01:00
|
|
|
chgrp -R tomcat /srv/tomcat
|
|
|
|
chown -R tomcat /srv/tomcat/conf /srv/tomcat/logs /srv/tomcat/temp /srv/tomcat/webapps /srv/tomcat/work
|
2019-11-30 19:00:03 +01:00
|
|
|
EOF
|
|
|
|
|
2020-03-13 17:03:03 +01:00
|
|
|
CMD /usr/bin/catalina.sh run
|