Tweak Tomcat permissions

This commit is contained in:
Disassembler 2020-03-20 15:21:16 +01:00
parent 40e26e4407
commit 590dde8206
Signed by: Disassembler
GPG Key ID: 524BD33A0EE29499
3 changed files with 5 additions and 8 deletions

@ -1 +1 @@
Subproject commit 44c1a8638d651a55e558ca9d97cd2222a367eeac Subproject commit d4bbce2dcf5ae73bfa22e6ce3a9c09b507857fb4

View File

@ -21,7 +21,8 @@ RUN EOF
# Create OS user # Create OS user
addgroup -S -g 8080 tomcat addgroup -S -g 8080 tomcat
adduser -S -u 8080 -h /srv/tomcat -s /bin/false -g tomcat -G tomcat 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 chgrp -R tomcat /srv/tomcat
chown -R tomcat /srv/tomcat/conf /srv/tomcat/logs /srv/tomcat/temp /srv/tomcat/webapps /srv/tomcat/work
EOF EOF
CMD /usr/bin/catalina.sh run CMD /usr/bin/catalina.sh run

View File

@ -13,11 +13,6 @@ RUN EOF
rm -f /srv/tomcat/bin/tomcat-native.tar.gz rm -f /srv/tomcat/bin/tomcat-native.tar.gz
rm -f /srv/tomcat/temp/safeToDelete.tmp rm -f /srv/tomcat/temp/safeToDelete.tmp
rm -rf /srv/tomcat/webapps/* rm -rf /srv/tomcat/webapps/*
# Change permissions
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 EOF
COPY image.d COPY image.d
@ -26,7 +21,8 @@ RUN EOF
# Create OS user # Create OS user
addgroup -S -g 8080 tomcat addgroup -S -g 8080 tomcat
adduser -S -u 8080 -h /srv/tomcat -s /bin/false -g tomcat -G tomcat 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 chgrp -R tomcat /srv/tomcat
chown -R tomcat /srv/tomcat/conf /srv/tomcat/logs /srv/tomcat/temp /srv/tomcat/webapps /srv/tomcat/work
EOF EOF
CMD /usr/bin/catalina.sh run CMD /usr/bin/catalina.sh run