Skip to content

Commit 053f60d

Browse files
authored
Add RemoteIpValve to the server.xml in the Docker images (#106)
1 parent b3521df commit 053f60d

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

openig-docker/Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ RUN apt-get update && apt-get install -y wget unzip \
2020
&& useradd -m -r -u 1001 -g root $OPENIG_USER \
2121
&& install -d -o $OPENIG_USER $OPENIG_BASE \
2222
&& chown -R $OPENIG_USER:root $CATALINA_HOME \
23-
&& apt-get remove -y --purge unzip && rm -rf /var/lib/apt/lists/*
23+
&& apt-get remove -y --purge unzip && rm -rf /var/lib/apt/lists/* \
24+
&& sed -i '/<\/Host>/i \ \ \ \ <Valve className=\"org.apache.catalina.valves.RemoteIpValve\" httpServerPort=\"8080\" httpsServerPort=\"443\" />' $CATALINA_HOME/conf/server.xml
2425

2526
USER $OPENIG_USER
2627

openig-docker/Dockerfile-alpine

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ RUN apk add --update --no-cache --virtual curl builddeps unzip bash && apk upgra
1919
&& adduser -S -u 1001 -G root $OPENIG_USER \
2020
&& install -d -o $OPENIG_USER $OPENIG_BASE \
2121
&& chown -R $OPENIG_USER $CATALINA_HOME/webapps \
22-
&& apk del unzip && rm -rf /var/cache/apk/*
22+
&& apk del unzip && rm -rf /var/cache/apk/* \
23+
&& sed -i '/<\/Host>/i \ \ \ \ <Valve className=\"org.apache.catalina.valves.RemoteIpValve\" httpServerPort=\"8080\" httpsServerPort=\"443\" />' $CATALINA_HOME/conf/server.xml
2324

2425
USER $OPENIG_USER
2526

0 commit comments

Comments
 (0)