Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding SOLR_OPTS, LS_JAVA_OPTS, and ES_JAVA_OPTS to patch against CVE-2021-44228 #358

Merged
merged 3 commits into from
Dec 10, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion images/elasticsearch/6.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ discovery.zen.minimum_master_nodes: "${DISCOVERY_ZEN_MINIMUM_MASTER_NODES}"' >>

RUN fix-permissions config

ENV ES_JAVA_OPTS="-Xms400m -Xmx400m" \
ENV ES_JAVA_OPTS="-Xms400m -Xmx400m -Dlog4j2.formatMsgNoLookups=true" \
DISCOVERY_ZEN_MINIMUM_MASTER_NODES=1 \
NODE_MASTER=true

Expand Down
2 changes: 1 addition & 1 deletion images/elasticsearch/7.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ cluster.remote.connect: "${CLUSTER_REMOTE_CONNECT}"' >> config/elasticsearch.yml

RUN fix-permissions config

ENV ES_JAVA_OPTS="-Xms400m -Xmx400m" \
ENV ES_JAVA_OPTS="-Xms400m -Xmx400m -Dlog4j2.formatMsgNoLookups=true" \
NODE_MASTER=true \
NODE_DATA=true \
NODE_INGEST=true \
Expand Down
2 changes: 1 addition & 1 deletion images/logstash/6.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,6 @@ ENV TMPDIR=/tmp \
RUN fix-permissions /usr/share/logstash/data \
&& fix-permissions /usr/share/logstash/config

ENV LS_JAVA_OPTS "-Xms400m -Xmx400m"
ENV LS_JAVA_OPTS "-Xms400m -Xmx400m -Dlog4j2.formatMsgNoLookups=true"

ENTRYPOINT ["/sbin/tini", "--", "/lagoon/entrypoints.bash", "/usr/local/bin/docker-entrypoint"]
2 changes: 1 addition & 1 deletion images/logstash/7.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,6 @@ ENV TMPDIR=/tmp \
RUN fix-permissions /usr/share/logstash/data \
&& fix-permissions /usr/share/logstash/config

ENV LS_JAVA_OPTS "-Xms400m -Xmx400m"
ENV LS_JAVA_OPTS "-Xms400m -Xmx400m -Dlog4j2.formatMsgNoLookups=true"

ENTRYPOINT ["/sbin/tini", "--", "/lagoon/entrypoints.bash", "/usr/local/bin/docker-entrypoint"]
2 changes: 2 additions & 0 deletions images/solr/7.7.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ RUN fix-permissions /var/solr \
# solr really doesn't like to be run as root, so we define the default user agin
USER solr

ENV SOLR_OPTS="-Dlog4j2.formatMsgNoLookups=true"

COPY 10-solr-port.sh /lagoon/entrypoints/
COPY 20-solr-datadir.sh /lagoon/entrypoints/

Expand Down
2 changes: 2 additions & 0 deletions images/solr/7.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ RUN fix-permissions /var/solr \
# solr really doesn't like to be run as root, so we define the default user agin
USER solr

ENV SOLR_OPTS="-Dlog4j2.formatMsgNoLookups=true"

COPY 10-solr-port.sh /lagoon/entrypoints/
COPY 20-solr-datadir.sh /lagoon/entrypoints/

Expand Down
2 changes: 2 additions & 0 deletions images/solr/8.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ RUN chmod 775 /opt/docker-solr/scripts/solr-recreate
# solr really doesn't like to be run as root, so we define the default user agin
USER solr

ENV SOLR_OPTS="-Dlog4j2.formatMsgNoLookups=true"

COPY 10-solr-port.sh /lagoon/entrypoints/
# currently, there is no smart upgrade path from 7 to 8 - no autoremediation etc
# and whilst sites may work, upgrading from 7 to 8, they won't work downgrading...
Expand Down