Spotter-VM/lxc-shared/alpine3.11-tomcat8.5/image

33 lines
1021 B
Plaintext
Raw Normal View History

IMAGE alpine3.11-tomcat8.5_8.5.51-200313
FROM alpine3.11-java8_8.242.08-200313
2019-03-01 12:21:18 +01:00
RUN EOF
# Install Tomcat 8.5
wget https://archive.apache.org/dist/tomcat/tomcat-8/v8.5.51/bin/apache-tomcat-8.5.51.tar.gz -O - | tar xzf - -C /srv
mv /srv/apache-tomcat-8.5.51 /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
rm -rf /srv/tomcat/webapps/*
2019-03-01 12:21:18 +01:00
# Change permissions
2019-03-01 12:21:18 +01:00
find /srv/tomcat -type d -exec chmod 755 {} +
find /srv/tomcat -type f -not -path '/srv/tomcat/conf/*' -exec chmod 644 {} +
chmod 755 /srv/tomcat/bin/*.sh
EOF
COPY image.d
2019-09-18 11:29:58 +02: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
chown -R tomcat:tomcat /srv/tomcat/conf /srv/tomcat/logs /srv/tomcat/temp /srv/tomcat/webapps /srv/tomcat/work
EOF
CMD /usr/bin/catalina.sh run