Skip to content

Commit af670b9

Browse files
committed
Update to use tomcat-docker:8.5
1 parent 1f60583 commit af670b9

File tree

3 files changed

+14
-5
lines changed

3 files changed

+14
-5
lines changed

.dockerignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.git
2+
.gitignore
3+
README.md

Dockerfile

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM unidata/tomcat-docker:latest
1+
FROM unidata/tomcat-docker:8.5
22
MAINTAINER Kyle Wilcox <kyle@axiomdatascience.com>
33

44
ENV ERDDAP_VERSION 1.82
@@ -25,10 +25,6 @@ COPY files/setenv.sh ${CATALINA_HOME}/bin/setenv.sh
2525
# ERDDAP setup.xml
2626
COPY files/setup.xml ${CATALINA_HOME}/content/erddap/setup.xml
2727

28-
RUN mkdir -p ${ERDDAP_DATA} && \
29-
chown -R tomcat:tomcat "${ERDDAP_DATA}" && \
30-
chown -R tomcat:tomcat "${CATALINA_HOME}"
31-
3228
COPY entrypoint.sh /
3329
ENTRYPOINT ["/entrypoint.sh"]
3430

entrypoint.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,16 @@ set -e
77

88
if [ "$1" = 'start-tomcat.sh' ] || [ "$1" = 'catalina.sh' ]; then
99

10+
USER_ID=${TOMCAT_USER_ID:-1000}
11+
GROUP_ID=${TOMCAT_GROUP_ID:-1000}
12+
13+
###
14+
# Tomcat user
15+
###
16+
groupadd -r tomcat -g ${GROUP_ID} && \
17+
useradd -u ${USER_ID} -g tomcat -d ${CATALINA_HOME} -s /sbin/nologin \
18+
-c "Tomcat user" tomcat
19+
1020
###
1121
# Change CATALINA_HOME ownership to tomcat user and tomcat group
1222
# Restrict permissions on conf

0 commit comments

Comments
 (0)