We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e526695 commit 134380cCopy full SHA for 134380c
docker-entrypoint.sh
@@ -0,0 +1,21 @@
1
+#!/bin/sh
2
+
3
+set -eux
4
5
+# Drop root privileges if we are running catalina
6
+# allow the container to be started with `--user`
7
8
+if [ "$1" = 'catalina' -a "$(id -u)" = '0' ]; then
9
10
+ # Change the ownership to tomcat
11
+ chown -R tomcat:tomcat ${CATALINA_HOME}/* && chown -R tomcat:tomcat /data
12
+ shift
13
+ exec su-exec tomcat /opt/tomcat/bin/catalina.sh "$@"
14
+else
15
16
+ # As argument is not related to catalina,
17
+ # then assume that user wants to run his own process,
18
+ # for example a `bash` shell to explore this image
19
+ exec "$@"
20
21
+fi
0 commit comments