Skip to content

Commit 6f1c628

Browse files
committed
Get rid of tomcat user for ease of use
1 parent e826a7e commit 6f1c628

File tree

6 files changed

+6
-30
lines changed

6 files changed

+6
-30
lines changed

6-jre7/Dockerfile

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,9 @@
11
FROM java:7-jre
22

3-
# add our user and group first to make sure their IDs get assigned consistently, regardless of whatever dependencies get added
4-
RUN groupadd -r tomcat && useradd -r --create-home -g tomcat tomcat
5-
63
ENV CATALINA_HOME /usr/local/tomcat
74
ENV PATH $CATALINA_HOME/bin:$PATH
8-
RUN mkdir -p "$CATALINA_HOME" && chown tomcat:tomcat "$CATALINA_HOME"
5+
RUN mkdir -p "$CATALINA_HOME"
96
WORKDIR $CATALINA_HOME
10-
USER tomcat
117

128
# see https://www.apache.org/dist/tomcat/tomcat-8/KEYS
139
RUN gpg --keyserver pgp.mit.edu --recv-keys \

6-jre8/Dockerfile

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,9 @@
11
FROM java:8-jre
22

3-
# add our user and group first to make sure their IDs get assigned consistently, regardless of whatever dependencies get added
4-
RUN groupadd -r tomcat && useradd -r --create-home -g tomcat tomcat
5-
63
ENV CATALINA_HOME /usr/local/tomcat
74
ENV PATH $CATALINA_HOME/bin:$PATH
8-
RUN mkdir -p "$CATALINA_HOME" && chown tomcat:tomcat "$CATALINA_HOME"
5+
RUN mkdir -p "$CATALINA_HOME"
96
WORKDIR $CATALINA_HOME
10-
USER tomcat
117

128
# see https://www.apache.org/dist/tomcat/tomcat-8/KEYS
139
RUN gpg --keyserver pgp.mit.edu --recv-keys \

7-jre7/Dockerfile

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,9 @@
11
FROM java:7-jre
22

3-
# add our user and group first to make sure their IDs get assigned consistently, regardless of whatever dependencies get added
4-
RUN groupadd -r tomcat && useradd -r --create-home -g tomcat tomcat
5-
63
ENV CATALINA_HOME /usr/local/tomcat
74
ENV PATH $CATALINA_HOME/bin:$PATH
8-
RUN mkdir -p "$CATALINA_HOME" && chown tomcat:tomcat "$CATALINA_HOME"
5+
RUN mkdir -p "$CATALINA_HOME"
96
WORKDIR $CATALINA_HOME
10-
USER tomcat
117

128
# see https://www.apache.org/dist/tomcat/tomcat-8/KEYS
139
RUN gpg --keyserver pgp.mit.edu --recv-keys \

7-jre8/Dockerfile

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,9 @@
11
FROM java:8-jre
22

3-
# add our user and group first to make sure their IDs get assigned consistently, regardless of whatever dependencies get added
4-
RUN groupadd -r tomcat && useradd -r --create-home -g tomcat tomcat
5-
63
ENV CATALINA_HOME /usr/local/tomcat
74
ENV PATH $CATALINA_HOME/bin:$PATH
8-
RUN mkdir -p "$CATALINA_HOME" && chown tomcat:tomcat "$CATALINA_HOME"
5+
RUN mkdir -p "$CATALINA_HOME"
96
WORKDIR $CATALINA_HOME
10-
USER tomcat
117

128
# see https://www.apache.org/dist/tomcat/tomcat-8/KEYS
139
RUN gpg --keyserver pgp.mit.edu --recv-keys \

8-jre7/Dockerfile

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,9 @@
11
FROM java:7-jre
22

3-
# add our user and group first to make sure their IDs get assigned consistently, regardless of whatever dependencies get added
4-
RUN groupadd -r tomcat && useradd -r --create-home -g tomcat tomcat
5-
63
ENV CATALINA_HOME /usr/local/tomcat
74
ENV PATH $CATALINA_HOME/bin:$PATH
8-
RUN mkdir -p "$CATALINA_HOME" && chown tomcat:tomcat "$CATALINA_HOME"
5+
RUN mkdir -p "$CATALINA_HOME"
96
WORKDIR $CATALINA_HOME
10-
USER tomcat
117

128
# see https://www.apache.org/dist/tomcat/tomcat-8/KEYS
139
RUN gpg --keyserver pgp.mit.edu --recv-keys \

8-jre8/Dockerfile

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,9 @@
11
FROM java:8-jre
22

3-
# add our user and group first to make sure their IDs get assigned consistently, regardless of whatever dependencies get added
4-
RUN groupadd -r tomcat && useradd -r --create-home -g tomcat tomcat
5-
63
ENV CATALINA_HOME /usr/local/tomcat
74
ENV PATH $CATALINA_HOME/bin:$PATH
8-
RUN mkdir -p "$CATALINA_HOME" && chown tomcat:tomcat "$CATALINA_HOME"
5+
RUN mkdir -p "$CATALINA_HOME"
96
WORKDIR $CATALINA_HOME
10-
USER tomcat
117

128
# see https://www.apache.org/dist/tomcat/tomcat-8/KEYS
139
RUN gpg --keyserver pgp.mit.edu --recv-keys \

0 commit comments

Comments
 (0)